Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2003-08-11 : 07:06:51
|
| Krishna Mohan writes "Pls send me SQL query, Last day of the monthThanks" |
|
|
Page47
Master Smack Fu Yak Hacker
2878 Posts |
Posted - 2003-08-11 : 07:10:38
|
| The last day of the month is always the day before the first day of the next month...Jay White{0} |
 |
|
|
Merkin
Funky Drop Bear Fearing SQL Dude!
4970 Posts |
Posted - 2003-08-11 : 07:16:28
|
| Even in a leap year ?Damian |
 |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2003-08-11 : 07:18:18
|
| SELECT DateAdd(day, -1, DateAdd(month, DateDiff(month, 0, dateValue)+1, 0)) |
 |
|
|
Page47
Master Smack Fu Yak Hacker
2878 Posts |
Posted - 2003-08-11 : 07:30:36
|
| Rob's idea is ok.I'd also try writing a dts package to cursor through the rows of an excel spreadsheet that contains every date ... I'll run some tests to figure out which is faster.Jay White{0} |
 |
|
|
Arnold Fribble
Yak-finder General
1961 Posts |
Posted - 2003-08-11 : 08:52:43
|
| You ok there Jay? |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-08-11 : 12:53:38
|
| You guys are too funny!Tara |
 |
|
|
Amethystium
Aged Yak Warrior
701 Posts |
Posted - 2003-08-11 : 13:20:22
|
I think he is practicing his urine extraction technique. Sorry for the scientific description but I'm trying to be as polite as possible.------------------------------------------------------------------------------I enjoy using SQL Server but I am not part of the Microsoft fanboy club! NEVER!! |
 |
|
|
|
|
|