Convert DateTime to long and also the other way around

To long from DateTime:

long DateTime.Ticks

To DateTime from long:

new DateTime(long)

Leave a Comment