This project has moved. For the latest updates, please go here.

DateTime

May 22, 2015 at 9:40 PM
I'm trying to set a Date to a cell but the client says it MUST be a date value and must not include time. C# doesnt have separate date and time data types so when i set the value of the cell to a datetime, the time is still in the value even though the custom formatting doesnt display time, so when they import it fails.
running out of ideas, I've tried strings, datetime, OADates, might have to resort to pasting
May 25, 2015 at 5:07 PM
Think I got it. All I needed to do was use midnight as the time in C# and in excel that got rid of the time. and for a column with just time, I had to use a new DateTime(1,1,1).add(dateVal.TimeofDay) to get just the time to show up in excel.
Jun 3, 2015 at 12:33 PM