.net – How to convert an Excel serial date number to a .NET DateTime

.netdatetimeexcel

How do I convert from excel serial date to a .NET date time?

For example 39938 is 05/05/2009.

Best Solution

I find it simpler using FromOADate method, for example:

DateTime dt = DateTime.FromOADate(39938);

Using this code dt is "05/05/2009".