Re: pgsql DATE
Lincoln Yeoh <lylyeoh@mecomb.com>
From: Lincoln Yeoh <lylyeoh@mecomb.com>
To: "Andras Balogh" <abalogh@grafx.ro>, "Martijn van Oosterhout" <kleptog@cupid.suninternet.com>
Cc: <pgsql-general@postgresql.org>
Date: 2000-04-27T09:28:35Z
Lists: pgsql-general
At 11:03 AM 27-04-2000 +0300, Andras Balogh wrote: >Hi, > >Thank You for your reply. >BUT as i mentioned the date_time field is VARCHAR. >So if i use: >date >= '01/4/2000' and date < '01/5/2000' > >this won't compare the dates it will compare Strings. >so '02/4/2000' will be GREATER than '01/5/2000'. > >That is why i need a DATE TYPE for my field that can be used to create an >index. > >So any other ideas? If you need a date type for your field, use a date type. http://www.postgresql.org/docs/postgres/datatype1143.htm Cheerio, Link.