I am using postgres 8.3.12 and novice.
I have a column formatted as follows: '29/04/2013 at 09:27:51 PM (or AM)'
I am doing the following to set them to a timestamp:
case when <criteria> to_timestamp(time, 'MM/DD/YYYY at HH:MI:SS AM') as start
case when <criteria> to_timestamp(time, 'MM/DD/YYYY at HH:MI:SS AM') as end
My goal is to calculate the hours between two time stamps.
I looked at http://www.postgresql.org/docs/current/static/functions-datetime.html
After I set them to timestamps, is it simply end - start as difference;