Search Postgresql Archives

Re: Compare an integer to now() - interval '3 days'

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

 



On Mar 11, 2011, at 6:44 PM, Alexander Farber wrote:

> from drupal_field_data_field_gender g, drupal_users u
> where g.field_gender_value='Robot' and
> u.uid=g.entity_id and u.created::timestamp > now() - interval '1 day';
> ERROR:  cannot cast type integer to timestamp without time zone


Use to_timestamp function. For more detail refer following documentation:
http://www.postgresql.org/docs/8.3/static/functions-formatting.html

Thanks & Regards,
Vibhor Kumar
EnterpriseDB Corporation
The Enterprise PostgreSQL Company
vibhor.kumar@xxxxxxxxxxxxxxxx
Blog:http://vibhork.blogspot.com


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[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