WHERE clause with timestamp data type - Mailing list pgsql-novice

From Chirag Patel
Subject WHERE clause with timestamp data type
Date
Msg-id 588009.30252.qm@web52811.mail.re2.yahoo.com
Whole thread Raw
Responses Re: WHERE clause with timestamp data type  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: WHERE clause with timestamp data type  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
List pgsql-novice
The following command works great,
SELECT AVG(column) FROM table WHERE timestamp > 2007-08-23;

But when I try it with finer resolution (hour, minutes, seconds) like this, I get a syntax error
SELECT AVG(heartrate) FROM heartrates WHERE timestamp > 2007-08-23 19:48:09;

Do I need to convert from string format to total number of seconds? Any ideas on how to get this work?

Thanks!
Chirag




pgsql-novice by date:

Previous
From: "Oliveiros Cristina"
Date:
Subject: Re: How to import a csv
Next
From: Tom Lane
Date:
Subject: Re: WHERE clause with timestamp data type