I am scraping invoices and need to format the dates. Dates could be in any format such as below
I have tried the below assign code and many others just cant seem to find something that will work 100%
Assign: String was not recognized as a valid DateTime.
strparsedate = DateTime.ParseExact(dataSetResults.Tables(0).Rows(0).Item("InvoiceDate".ToString).ToString, “dd/MM/yyyy”,System.Globalization.DateTimeFormatInfo.InvariantInfo)
Did this thread help you resolve this
do you have an xaml of this. I keep getting errors
May I know in what format you want to change the date ?
I had tried that but I didnt have the date set as date format in the taxonomy.
Its now working.
Have a look here:
here we do handle different dateformats in one ParseExact
I have tied this. Still getting the same error.
strparsedate = DateTime.ParseExact(dataSetResults.Tables(0).Rows(0).Item("InvoiceDate".ToString).ToString,dateformat,CultureInfo.InvariantCulture,DateTimeStyles.None)
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.