Search Postgresql Archives

Converting a timestamp to a time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm in the middle of moving a production database from 7.1 to 8.1 and have hit a
slight problem.

On the old system I've got a query including

datastamp AS datastamp, date(datastamp ) as datadate,
time(datastamp ) as datatime, status,  -- etc.

This is actually generated on the client to possibly include timezone
correction. Obviously this has worked fine for a number of years on 7.1, but 8.1
is objecting to the time() cast.

What is the correct (or even any :-) way of converting a timestamp into a time
(without timezone etc.)?

Any suggestions would be much appreciated.

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux