Skip site navigation (1) Skip section navigation (2)

Re: Problem with the to_timestamp function

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Luca Clementi <lclement(at)ucsd(dot)edu>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Problem with the to_timestamp function
Date: 2008-01-31 00:26:10
Message-ID: 27257.1201739170@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-sql
Luca Clementi <lclement(at)ucsd(dot)edu> writes:
> It seems that the to_timestamp does not work properly in this case, 
> when it comes to parsing the hours.

to_timestamp() is not very robust if the input doesn't exactly match
what it expects for the format string.  I'm not sure if that's the
issue here, but have you tried just casting the string to timestamp?
That would use the standard timestamp input converter, which is
pretty flexible.

(BTW, there is definitely 0 hope of recognizing a timezone name that's
written in Chinese characters, unless maybe you fool around with the
timezone-abbreviations configuration file.)

			regards, tom lane

In response to

Responses

pgsql-sql by date

Next:From: Michael GlaesemannDate: 2008-01-31 01:19:21
Subject: Re: Problem with the to_timestamp function
Previous:From: Luca ClementiDate: 2008-01-30 23:37:01
Subject: Problem with the to_timestamp function

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group