Re: [SQL] Help On Postgresql

2001-08-31 Thread Henshall, Stuart - WCP
a) Either of these should return the yaer (2001). See section 4.7 of the user guide SELECT EXTRACT(YEAR FROM TIMESTAMP '2001-02-16 20:38:40'); SELECT date_part('year', TIMESTAMP '2001-02-16 20:38:40'); b) The serial datatype will do this. It is actually just an int4 with a default value of nextva

Re: [SQL] Help On Postgresql

2001-08-30 Thread Stephan Szabo
On Thu, 23 Aug 2001, Jaydip wrote: > a) How do I retrieve the Year,Month,Day,Hr,Minute or Second value from a >Date/DateTime variable. > > For Example : i> In Oracle to_char(dt,'') - for extracting the year value >from a date variable dt > ii> In SqlServer datepart(hh,

Re: [SQL] Help On Postgresql

2001-08-30 Thread Jeff Eckermann
a)  Look at "Date/Time Functions" in the docs: specifically, listed under "Functions and Operators" in the Users Guide. b) "Serial" type will do this.  Look under "Numeric Types" , in the "Data Types" section of the Users Guide. - Original Message - From: Jaydip To: [EMAIL

[SQL] Help On Postgresql

2001-08-30 Thread Jaydip
Dear Friends   I am Jaydip Dewanji working as a Sr. Programmer for Ontrack Systems Ltd.   I have some questions regarding Postgresql which are listed below:   a) How do I retrieve the Year,Month,Day,Hr,Minute or Second value from a Date/DateTime variable.       For Example : i> In Oracle to_