Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

Reading a date from xlsx using open xml sdk

public static bool TryParseExcelDateTime(string excelDateTimeAsString, out DateTime dateTime)
{
    double oaDateAsDouble;
    if (!double.TryParse(excelDateTimeAsString, out oaDateAsDouble)) //this line is Culture dependent!
        return false;
    //[...]
    dateTime = DateTime.FromOADate(oaDateAsDouble);
Comment

PREVIOUS NEXT
Code Example
Csharp :: How to compile just one file in c# 
Csharp :: new bitmap pixel format c# 
Csharp :: translate nicely between two vector3 
Csharp :: vb.net tostring numeric format string 
Csharp :: find first occurrence of character in string 
Csharp :: c# hashset 
Csharp :: unity transform.translate 
Csharp :: page refresh on button click in c# 
Csharp :: unity reload script assemblies 
Csharp :: minimum value int C# 
Csharp :: swagger skip endpoint .net core 
Csharp :: linq where c# 
Csharp :: c# second last index 
Csharp :: c# filesystemwatcher 
Csharp :: what does - in f#? 
Csharp :: width="331" height="331" 
Csharp :: C# webclient immitate browser 
Csharp :: c# boundingbox text 
Html :: font-awesome envelope 
Html :: html anchor tag open in new tab 
Html :: align center inner div using bootstrap 
Html :: divi font awesome 
Html :: html disable enter submit 
Html :: html select required 
Html :: difference between name and value in html 
Html :: read only html 
Html :: justify-content-between bootstrap 4 
Html :: open new tab html 
Html :: source sans pro html code 
Html :: html image fallback 
ADD CONTENT
Topic
Content
Source link
Name
5+1 =