I'm trying to parse a cell value in excel sheet and convert it to Datetime using following code.But I'm getting an error as :
'arguments.CurrentWorksheet.Workbook.NumberToDateTime(inpDate)' threw an exception of type 'System.ArgumentOutOfRangeException' base: {"Specified argument was out of the range of valid values.\r\nParameter name: Invalid date-time serial number."} ActualValue: null Message: "Specified argument was out of the range of valid values.\r\nParameter name: Invalid date-time serial number."
Code:
double inpDate = arguments.GetNumber(2);
startDate = arguments.CurrentWorksheet.Workbook.NumberToDateTime(inpDate);
where inpDate in the sheet is 20170113.
Could you advise please?
Thanks.