I have a table with a date and time field. I'm having difficulty understanding how I deal with this, partially as I don't understand how time can be converted to a number. I made a table using the following command:
CREATE TABLE tracking.time_record
(
date date,
"time" time without time zone,
id character(100)
)
An example of my data is as follows:
"2012-04-18" | "18:33:19.612" | "2342342384"
How can I run a query such that I can examine all of the id values that have a time value > 10 pm on a certain day, for example?
I realize that as my time is stored in a character type variable so something like this does not work:
SELECT * FROM tracking.time_record
WHERE "time" > "04:33:38.884" AND date > "2012-04-18"
(This is my first exploration of time/date tracking - I should probably have chosen different column names)