Hi!
I was using the code below to get the correct cutoff value. It was working before but when I ran it again, the year changes from 2020 to 0001
varSample.ToString(“yyyy-MM-dd”) should return 2020-01-31 but now it returns 0001-01-31
Hi!
I was using the code below to get the correct cutoff value. It was working before but when I ran it again, the year changes from 2020 to 0001
varSample.ToString(“yyyy-MM-dd”) should return 2020-01-31 but now it returns 0001-01-31
@caduque, Where are you reading the cutoff date value from?
Can you use a write line before trying to convert it to this format, just to see if the value was extracted correct from where you are getting it.
Hi,
It might be CultureInfo matter. Can you try the following?
.ToString("yyyy-MM-dd", System.Globalization.CultureInfo.InvariantCulture)
Regards,