Posts

Showing posts from December, 2011

Donate

Using Microsoft.VisualBasic DateDiff() Function In Your C# Program

Below is a snippet on how to use the Microsoft.VisualBasic DateDiff() Function in your C# program. Add the Microsoft.VisualBasic reference to your project so that you can access it's underlying classes and methods. long age = Microsoft.VisualBasic.DateAndTime.DateDiff( "yyyy" ,Convert.ToDateTime( "1985-04-04" ),DateTime.Now);

Donate