TO_DATE and single digit months driving me nuts...

Поиск
Список
Период
Сортировка
От Philip Hallstrom
Тема TO_DATE and single digit months driving me nuts...
Дата
Msg-id 200005240100.SAA74006@illiad.adhesivemedia.com
обсуждение исходный текст
Ответы Re: TO_DATE and single digit months driving me nuts...  (Karel Zak <zakkr@zf.jcu.cz>)
Список pgsql-general
Hi -
    I'm playing around with inserting dates into a timestamp field and
am getting annoyed at single digit dates/days/hours/minutes.
The problem is that I have something like:
TO_TIMESTAMP('2000 5 25 09 30', 'YYYY MM DD HH24 MI')
which fails because it expects the month to be "05" instead of "5".  Other
than pad all these myself in my code, is there some way to tell the
formatter to allow for missing leading zeros?  Something similar to the
"fm" format option, but a bit different...
Thanks!
-philip


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Explain auth/access/priv system??
Следующее
От: Tatsuo Ishii
Дата:
Сообщение: Re: quick (and probably dumb) question