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); 

Comments

Donate

Popular Posts From This Blog

WPF CRUD Application Using DataGrid, MVVM Pattern, Entity Framework, And C#.NET

How To Insert Or Add Emojis In Microsoft Teams Status Message

TypeScript Error Or Bug: The term 'tsc' is not recognized as the name of a cmdlet, function, script file, or operable program.