Обсуждение: Date

Поиск
Список
Период
Сортировка

Date

От
cristi voinicaru
Дата:
I have a big problem!
I have a table which has a field by date type.
The date format is mm/dd/yyyy.
When I'm doing this select:
select da from a where da='03-31-2002';
the result is :
03-30-2002
03-30-2002
03-30-2002
I repet: only on '03-31-2002'!

What's going on?

Thanks in advance for any help.


__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/

Re: Date

От
"Josh Berkus"
Дата:
Cristi,

> salt=> SELECT da FROM a WHERE da =
>  to_date('03-31-2002','MM-DD-YYYY');
> ERROR:  No such function 'to_date' with the specified attributes
>
> salt=> SELECT da FROM a WHERE da = (DATE '2002-03-31');
> 03-30-2002
> 03-30-2002
<snip>
> 03-30-2002
> (1808 rows)

Please post both your postgres version and your actual CREATE TABLE
 statement.

-Josh Berkus