how to cast for dates/datetimes?

From: "D(dot) Duccini" <duccini(at)backpack(dot)com>
To: Pgsql-novice <pgsql-novice(at)postgreSQL(dot)org>
Subject: how to cast for dates/datetimes?
Date: 2000-08-21 23:22:36
Message-ID: Pine.GSO.4.03.10008211820550.21654-100000@ra.bpsi.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice


how do i get around this?

select sum(total) from lineitemsnext where date <= ('now'::date + '1
month'::timespan);

ERROR: Unable to identify an operator '<=' for types 'date' and
'datetime'
You will have to retype this query using an explicit cast

-----------------------------------------------------------------------------
david(at)backpack(dot)com BackPack Software, Inc. www.backpack.com
+1 651.645.7550 voice "Life is an Adventure.
+1 651.645.9798 fax Don't forget your BackPack!"
-----------------------------------------------------------------------------

Browse pgsql-novice by date

  From Date Subject
Next Message Dave_Pfaltzgraff 2000-08-22 12:03:52 Re: how to cast for dates/datetimes?
Previous Message doug 2000-08-21 18:29:31 Re: How to connect applet to different SQL server.