Re: After Upgrade from 8.2.6 to 8.3.6: function to_timestamp does not exist

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Nico Grubert <nicogrubert(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: After Upgrade from 8.2.6 to 8.3.6: function to_timestamp does not exist
Date: 2009-03-06 07:02:04
Message-ID: dcc563d10903052302p3d07b472xf134545bbd364c0d@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Mar 5, 2009 at 11:59 PM, Nico Grubert <nicogrubert(at)gmail(dot)com> wrote:
>
>> OK, so you want to see if a timestamp is greater than now()?  Why not
>> just compare them?
>>
>> where a.from_datetime >= now()
>
> No, not the whole timestamp. I dont want to check the time.
> So I had to truncate the datetime with:
>
> date_trunc('day', a.from_datetime) >= date_trunc('day', NOW())

The functionality is the same, since the now() will get rounded down
to the date with time of 00:00:00. So, anytime for that day will be
>= to the output of date_trunc('day',now())

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adam Rich 2009-03-06 07:03:22 Re: After Upgrade from 8.2.6 to 8.3.6: function to_timestamp does not exist
Previous Message Scott Marlowe 2009-03-06 07:01:00 Re: After Upgrade from 8.2.6 to 8.3.6: function to_timestamp does not exist