Re: now() + integer, not rounded to whole day - Mailing list pgsql-sql

From jirinej@volny.cz (JN)
Subject Re: now() + integer, not rounded to whole day
Date
Msg-id 7e29a94a.0410250127.4b463df1@posting.google.com
Whole thread Raw
Responses Re: now() + integer, not rounded to whole day
List pgsql-sql
jirinej@volny.cz (JN) wrote in message news:<7e29a94a.0410220404.314f4308@posting.google.com>...
> Is it possible to add some portion of the day to now() ? I cannot
> round now() to whole days like now()::date. Hours, minutes and seconds
> are also important to me. This I had in Oracle, and need to convert it
> :
> 
> sysdate + 1/1440
> 
> Thanks for any suggestion.

It's simpler than I thought 

now() + (TO_TIMESTAMP('1970-01-01 00:01:00', 'yyyy-mm-dd HH24:MI:SS')
- TO_TIMESTAMP('1970-01-01 00:00:00', 'yyyy-mm-dd HH24:MI:SS'))


pgsql-sql by date:

Previous
From: "Davide Negri"
Date:
Subject: Question on the 8.0Beta Version
Next
From: David Siegal
Date:
Subject: Re: Aggregate Function with Argument