Hi,
I have to calculate the differnece between the current date and a transaction date that comes from database.if the difference between two dates is grater than 90 days i have to perform some actions.How to do this in C# pls help me.
Thanks,
Visual C# General
Hi,
I have to calculate the differnece between the current date and a transaction date that comes from database.if the difference between two dates is grater than 90 days i have to perform some actions.How to do this in C# pls help me.
Thanks,
Try this:
DateTime
d1 = DateTime.Today; DateTime d2 = GetDateFromDataBase(); if (d2.AddDays(90) > d1){
// Perform your action}
You can check these links
http://www.dotnetspider.com/kb/Article1552.aspx
http://www.aspcode.net/C-Datediff.aspx