Re: to_date() - Mailing list pgsql-sql

From Kaare Rasmussen
Subject Re: to_date()
Date
Msg-id 20020603160445.0901F475BC2@postgresql.org
Whole thread Raw
In response to to_date()  ("Paul " <paul@operamail.com>)
List pgsql-sql
> Can someone explain to me why this happens?
> ======
> select to_date('2002-04-29 07:33:55.000','FXYYYY-MM-DD HH24:MM:SS.MS') as
> rebill_date; rebill_date
> -------------
>  2004-09-30

If you only want the date:
select to_date('2002-04-29 07:33:55.000','FXYYYY-MM-DD HH24:MI:SS.MS') as 
rebill_date;

If you want the whole thing:
select to_timestamp('2002-04-29 07:33:55.000','FXYYYY-MM-DD HH24:MI:SS.MS') 
as rebill_date;

MM is month
MI is minute

-- 
Kaare Rasmussen            --Linux, spil,--        Tlf:        3816 2582
Kaki Data                tshirts, merchandize      Fax:        3816 2501
Howitzvej 75               Åben 12.00-18.00        Web:      www.suse.dk
2000 Frederiksberg        Lørdag 11.00-17.00       Email: kar@kakidata.dk


pgsql-sql by date:

Previous
From: Andre Schubert
Date:
Subject: Re: How to update
Next
From: "Marie G. Tuite"
Date:
Subject: passing a list to a function and returning a recordset