RE: [GENERAL] extracting date information?

Поиск
Список
Период
Сортировка
От Jackson, DeJuan
Тема RE: [GENERAL] extracting date information?
Дата
Msg-id F10BB1FAF801D111829B0060971D839F292EF8@dal_cps.cpsgroup.com
обсуждение исходный текст
Ответы Re: [GENERAL] extracting date information?  (wr@tribe.ping.de)
Список 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 по дате отправления:

Предыдущее
От: Kevin Heflin
Дата:
Сообщение: Re: [GENERAL] extracting date information?
Следующее
От: lynch@lscorp.com (Richard Lynch)
Дата:
Сообщение: User Authentication Failed