One Quickie


Inserting a time column (Postgresql->General)
If you have the minutes, seconds, and am/pm and want to get them into a time column (time without timezone), you can do something like this:

psql=# select to_timestamp('10:45am', 'HH12:MIam')::timetz::time;
 to_timestamp
--------------
 10:45:00
(1 row)



borkware home | products | miniblog | rants | quickies | cocoaheads
Advanced Mac OS X Programming book

webmonster@borkware.com