Re: Date Anomaly??

Поиск
Список
Период
Сортировка
От Thomas Good
Тема Re: Date Anomaly??
Дата
Msg-id Pine.LNX.4.44.0305071157450.32335-100000@q8.nrnet.org
обсуждение исходный текст
Ответ на Re: Date Anomaly??  (Josh Berkus <josh@agliodbs.com>)
Список pgsql-sql
On Wed, 7 May 2003, Josh Berkus wrote:

Hey Josh, how goes?

> > Bottom line: there is no way to return a MM-DD-YYYY value?
>
> Really easy, actually:
> SELECT to_char(datefield, 'MM-DD-YYYY');

Thanks for this (thanks to Bruno and Tom as well!)

This does the trick for me:
SELECT TO_CHAR(CURRENT_DATE - INTERVAL '1 MONTH','MM-DD-YYYY');

> One of the things on my todo list (Item #18, though) is a pl/perl function
> that will accept any reasonable US date and return ISO standard for insert;
> I'll post it to the list when I'm done (maybe next week).

Excellent!

-----------------------------------------------------------------------
Thomas Good                                  e-mail: tomg@sqlclinic.net
Programmer/Analyst                           phone:   (+1) 718.818.5528
Residential Services                         fax:     (+1) 718.818.5056
Behavioral Health Services, SVCMC-NY         mobile:  (+1) 917.282.7359

// Das ist die Kunst - wie man alles verhunzt.



В списке pgsql-sql по дате отправления:

Предыдущее
От: mdc@keko.com.ar
Дата:
Сообщение: help database corruption
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Date Anomaly??