Dear Friend, Its more helpful.I am very thankful for providing this valuable information.bye.....
thanks a lot helped a lot
GRACIAS!!!!!Me ayudaste mucho con este dato.
This was extremely helpful! You saved my day!!!!
Hi ,I tested out this SQL Statement and it doesn't seem to work. My week starts on a Monday, so I set SQLs DATEFIRST to 1.I then ran the statement and declared the date as '2009-06-07'. When I ran the query it returned the value 2, which is incorrect. It should've returned 1, as the 7th June 2009 is still part of the first week that starts on a Monday and ends on a Sunday.Any suggestions on how to get around this?
Try this insteaddatediff(week, convert(varchar(6),@Date, 112) + '01', dateadd(dd,-1,@Date)) + 1
Post a Comment