| Author: greeny_1984 21 Nov 2008 | Member Level: Diamond | Rating:  Points: 3 |
i guess if u want to get only month part in u r date
u can use this
DATEPART(month, GETDATE())
books online option in sql sevrer 2000 provides info about all the
sql server related questions,u can check that for further info
Regards, Greeny_1984
Rate this Response[Excellent/Good/Poor] FRESHERS check this link Need help from me join here
|
| Author: Anil Kumar Pandey 21 Nov 2008 | Member Level: Diamond | Rating:  Points: 3 |
hi,
What are u storing in the INVOICEDATE column, if month then select somt from ghet date else use the getdate as it is..
like
SELECT invoicedate,projectname from invoice where invoicedate=getdate()
Regards Anil pandey
Thanks & Regards Anil Kumar Pandey
|
| Author: saisrikanthreddy 21 Nov 2008 | Member Level: Gold | Rating:  Points: 3 |
Hey Rahul
what is Invoicedate = 9mm,getdate()). what you need to compare? Explain it clearly. so we can give the solution.
*********** Regards, SaiSrikanthReddy
|
| Author: Deepika Haridas 21 Nov 2008 | Member Level: Diamond | Rating:  Points: 1 |
Check here
http://www.sql-server-helper.com/tips/date-formats.aspx
Thanks & Regards, Deepika Editor
If U want to shine like a SUN..First U have to burn like the SUN!! Need a Guide? Join my mentor program..
|
| Author: Sriman N Vangala 21 Nov 2008 | Member Level: Diamond | Rating:  Points: 4 |
Assuming that your requirement is to get all the invoicedate and Projectname details from the invoice table for a prticular month i.e the current month. then you can make use of the following query :
SELECT invoicedate,projectname from invoice where datepart(mm,invoicedate)=month(getdate())
|