Thread: month and 2000

month and 2000

From
Chairudin Sentosa Harjo
Date:
Dear All,

Two questions:

One
---
How to select a date in order to get this form:
30-OCT-1999

I tried :
select date(sub_date) from tbl_date;
30-10-1999

What switch do I need to get 'OCT'?


Two
---
Why this happen?

tbs=> select date ('now');
     date
----------
01-01-2000
(1 row)

I am sure the time on my computer is correct,
the year is 1999, the month is October
and the date is 4th.
Why the select gives 1st January 2000???

SuSE 6.2, Postgresql 6.5.2, Pentium III.

Regards,
Chai