in my sql below i am calculating next moday,
here in below i passed 7/11/2011 which is monday it will returns 07/18/2011 which is next monday
select DaTEADD([day], ((DATEDIFF([day], '19000101', convert (datetime, '07/11/2011')) / 7) * 7) + 7, '19000101')
here in below i passed 7/10/2011 which is Sunday it will returns 07/11/2011 which is next monday
select DaTEADD([day], ((DATEDIFF([day], '19000101', convert (datetime, '07/10/2011')) / 7) * 7) + 7, '19000101')
so now the piece i am trying is
if the given date is on or before last sunday of the month then it is just the given day itself
if it is falls after last sunday of the month then it shoud calculate to next monday(which is the above query, which calculates next monday)
i did several trys could somebody please assist me
please sir,
thanks a ton in advance
appreciate your help
asitti