RE: [GENERAL] extracting date information? - Mailing list pgsql-general

From Jackson, DeJuan
Subject RE: [GENERAL] extracting date information?
Date
Msg-id F10BB1FAF801D111829B0060971D839F292EF8@dal_cps.cpsgroup.com
Whole thread Raw
Responses Re: [GENERAL] extracting date information?  (wr@tribe.ping.de)
List pgsql-general
> > 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));



pgsql-general by date:

Previous
From: Kevin Heflin
Date:
Subject: Re: [GENERAL] extracting date information?
Next
From: lynch@lscorp.com (Richard Lynch)
Date:
Subject: User Authentication Failed