How to write datetime function for below statemen

Posted by Parcha under Sql Server on 10/28/2011 | Points: 10 | Views : 955 | Status : [Member] | Replies : 1
scheduletime and siginingdate are two columns
Scheduletime <= (Contract Signing Date + 1 year - 1 day).

plz help me




Responses

Posted by: SheoNarayan on: 10/28/2011 [Administrator] HonoraryPlatinum | Points: 25

Up
0
Down
It should be something like below

            DateTime contactDateTime = DateTime.Now; // will come from your database

DateTime scheduleDateTime = contactDateTime.AddYears(1).AddDays(-1);


Thanks

Regards,
Sheo Narayan
http://www.dotnetfunda.com

Parcha, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response