revi

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,



Re: Visual C# General difference between dates

pyeung

Try this:

Code Snippet

DateTime d1 = DateTime.Today;

DateTime d2 = GetDateFromDataBase();

if (d2.AddDays(90) > d1)

{

// Perform your action

}






Re: Visual C# General difference between dates