From: jirinej@volny.cz
To: pgsql-sql@postgresql.org
Subject: Re: now() + integer, not rounded to whole day
Date: 25 Oct 2004 02:27:01 -0700
Message-ID: <7e29a94a.0410250127.4b463df1@posting.google.com> (raw)
References: <7e29a94a.0410220404.314f4308@posting.google.com>
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'))
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: jirinej@volny.cz
Subject: Re: now() + integer, not rounded to whole day
In-Reply-To: <7e29a94a.0410250127.4b463df1@posting.google.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox