Problem with String to Datetime [String was not recognized as a valid DateTime.]

If I read from Cell:“B2” it can run without problem, so I dont know why when I read in Cell:“D2” it will be error String was not recognized as a valid DateTime.

B2 and D2 were write by same activity value as Now.ToString but not same day.

When read Cell B2 it worked.

When read Cell D2 had error.

Anyone has suggestion or/and concerns please help me.
Thank you.

Can you please print and see the D2 cell value (Datetest) once and check what it is printing.

I was read D2 cell and use write line print datetest it was below this.

Got it.
Your time format is in 24 HOUR format.
Please use HH:mm:ss instead of hh:mm:ss in the parsing.

Karthik Byggari


It worked.
Thank you so much. @KarthikByggari

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.