I have date variable
x = “Tue, 8 Dec 2020 09:59:46 -0600”
so when I use
Datetime.ParseExact(x, “ddd, dd MMM yyyy HH:mm:ss zzz”, nothing).ToString(“yyyyMMdd_HHmmss”)
But it fails when date is in single digit as error message shown in subject line.
Date can be both in single and double digit. So how this can be handled robustly
Thanks in advance