Re: SQL Date help - Mailing list pgsql-sql

From Karel Zak
Subject Re: SQL Date help
Date
Msg-id 20010326105806.C19983@ara.zf.jcu.cz
Whole thread Raw
In response to SQL Date help  ("waheed_rahuman" <waheed_rahuman@yahoo.com>)
List pgsql-sql
On Mon, Mar 26, 2001 at 12:24:07PM +0400, waheed_rahuman wrote:
> 
> 
> Hi,
> 
> I am a newbie to SQL and postgresql too.
> please guide me in the following...
Any problem with documentation?

> 1.How i can create date while i am inserting into the table ,in which the
> field is date data type.(date should not be a current date and its should be
> created
> as in java date(int,int,int)
INSERT INTO xxx VALUES (now());INSERT INTO xxx VALUES ('2000-01-01');

> 2. How i can compare the date field.

via standard operators, en example '<' '>' '=' 'between' ..etc. 

> For example ,
> how i can get the all the records between to two dates
 SELECT .... WHERE col BETWEEN '2000-01-01' AND '2001-01-01';Please(!), see

http://www.postgresql.org/users-lounge/docs/7.0/user/datatype.htm
http://www.postgresql.org/users-lounge/docs/7.0/user/operators.htm
http://www.postgresql.org/users-lounge/docs/7.0/user/operators2373.htm  
    Karel

-- Karel Zak  <zakkr@zf.jcu.cz>http://home.zf.jcu.cz/~zakkr/C, PostgreSQL, PHP, WWW, http://docs.linux.cz,
http://mape.jcu.cz


pgsql-sql by date:

Previous
From: Norbert Schollum
Date:
Subject: Functions and Triggers
Next
From: juerg.rietmann@pup.ch
Date:
Subject: Still don't know how to build this string ?