Thread
-
RE: [GENERAL] extracting date information?
Jackson, DeJuan <djackson@cpsgroup.com> — 1998-05-19T18:27:02Z
> > If you use "datetime" type instead of "date" and set datestyle = > 'Postgres' > > your data will be like: Sat Dec 12 00:00:00 1998 CET > > instead of: 1998-12-12 > > I actually stumbled across this after my initial post. > > Now that my dates are being retreived in this format: > Sat Dec 12 00:00:00 1998 CET > > Is there a way to format this to leave off the "time" portion and > maybe > the "timezone" info ? > Since you're using php why don't you try (with you date datatype): $date = '1998-05-05'; list($year, $mon, $day) = explode('-', $date); echo $date('l M d, Y', mktime(0,0,0,$mon, $day, $year)); -
Re: [GENERAL] extracting date information?
wr@tribe.ping.de — 1998-05-19T20:34:31Z
On Tue, May 19, 1998 at 01:27:02PM -0500, Jackson, DeJuan wrote: > > Now that my dates are being retreived in this format: > > Sat Dec 12 00:00:00 1998 CET > > > > Is there a way to format this to leave off the "time" portion and > > maybe > > the "timezone" info ? > > > Since you're using php why don't you try (with you date datatype): > $date = '1998-05-05'; > list($year, $mon, $day) = explode('-', $date); > echo $date('l M d, Y', mktime(0,0,0,$mon, $day, $year)); I have a similar problem which could be solved if i knew a possibility to convert datetime values to date values. There is only a function provided for the opposite direction. Werner -- Werner Reisberger public-key available: voice: +49 234 540294 Schoellmannstr. 20 pgp-public-keys@keys.pgp.net Fax: +49 234 540239 D-44807 Bochum with "get 0xED527449" in the subject