TO_DATE and single digit months driving me nuts... - Mailing list pgsql-general

From Philip Hallstrom
Subject TO_DATE and single digit months driving me nuts...
Date
Msg-id 200005240100.SAA74006@illiad.adhesivemedia.com
Whole thread Raw
Responses Re: TO_DATE and single digit months driving me nuts...
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: Explain auth/access/priv system??
Next
From: Tatsuo Ishii
Date:
Subject: Re: quick (and probably dumb) question