What is the best way of representing a DateTime
in Excel? We use Syncfusions Essential XlsIO to output values to an Excel document which works great. But I can\
You can set date time values to a cell in XlsIO using one of these options
sheet.Range["A1"].Value2 = DateTime.Now;
sheet.Range["A1"].NumberFormat = "dd/mm/yyyy";
sheet.Range["A2"].DateTime = DateTime.Now;
sheet.Range["A2"].NumberFormat = "[$-409]d-mmm-yy;@";
You can find more information here.
If, like me, you can't find a datetime under date or time in the format dialog, you should be able to find it in 'Custom'.
I just selected 'dd/mm/yyyy hh:mm' from 'Custom' and am happy with the results.