I find it simpler using FromOADate method, for example:
DateTime dt = DateTime.FromOADate(39938);
Using this code dt is “05/05/2009”.
More Related Contents:
- Clean up Excel Interop Objects with IDisposable
- ‘Microsoft.ACE.OLEDB.12.0’ provider is not registered on the local machine
- Calculate week of month in .NET
- The proper way to dispose Excel com object using VB.NET?
- How to count the number of rows in excel with data?
- Why can’t DateTime.ParseExact() parse “9/1/2009” using “M/d/yyyy”
- VB.Net – Excel COM Object not getting released [duplicate]
- SqlDateTime.MinValue != DateTime.MinValue, why?
- What is the correct format to use for Date/Time in an XML file
- How to get COM Server for Excel written in VB.NET installed and registered in Automation Servers list?
- JavaScriptSerializer UTC DateTime issues
- .NET DateTime.Now returns incorrect time when time zone is changed
- OpenXML SDK: Make Excel recalculate formula
- Windows 7 .net Excel .SaveAs() Error Exception from HRESULT: 0x800A03EC
- Can you round a .NET TimeSpan object?
- How to write an Excel workbook to a MemoryStream in .NET?
- Translate a column index into an Excel Column Name
- How do I parse and convert DateTime’s to the RFC 822 date-time format?
- Does .NET have the history of time zone changes?
- How to convert date format in vb.net?
- When Would You Prefer DateTime Over DateTimeOffset
- VB.NET Excel Program Leaves EXCEL.EXE floating after completion
- .net: How to parse a date with this format: 08 Feb 2011 06:46
- How to control appearance of ‘:’ in time zone offset when parsing/formatting Datetime
- My images are blurry! Why isn’t WPF’s SnapsToDevicePixels working?
- C# compiling for 32/64 bit, or for ‘Any CPU’? [duplicate]
- How to retrieve duration of MP3 in .NET?
- Detecting the number of processors
- How can I configure Entity Framework to automatically trim values retrieved for specific columns mapped to char(N) fields?
- Is it safe to call an RCW from a finalizer?