hey
my system get the date from a google sheet for eks. 12.12.2000
and im using datetime.parseexact
but the thing is 12.12.2000 this date has to be in string and when i use to string I get fail after its running
And also check if the date is not null or has any extra characters in it, because the error shows that it was not recognized as valid date.
Regards,
1 Like
@Pedram_Ziaei
From the given example it is ambigious which is day / month part
So let’s use such an example: 17.12.2000 - we assumed that in your culture the day part is on first position:
for such a format we do need ParseExact, where we can control the format pattern
When the day part is on the second position, then we can do:
And as mentioned by Vishal an empty string cannot be converted with any of the above mentioned options
1 Like