| Author |
Date Extraction
|
Aditi agarwal
Ranch Hand
Joined: Feb 23, 2011
Posts: 225
|
|
hey i have a table in which i have a field with date & time but its data type is date
now i want to comapre my this field on basis of month & year entered by me
Now i want to know how can i extract month & year only from my this field in database
Please help me
thank you
|
 |
Swastik Dey
Ranch Hand
Joined: Jan 08, 2009
Posts: 1196
|
|
Does this help?
http://developer.postgresql.org/pgdocs/postgres/functions-datetime.html
|
Swastik
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
|
Which of course won't work in several other servers like MS SQL Server. That one has functions YEAR, MONTH, DAY and DATEPART. So without knowing the database server in question we cannot answer this question (unless we provide the answer for each and every database server available).
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
 |
|
|
subject: Date Extraction
|
|
|