Hello
I have to do the following
if the column in excel says
8/20/2022
8/30/2020
must stay
August
January
Hello
I have to do the following
if the column in excel says
8/20/2022
8/30/2020
must stay
August
January
Hi @GDMM ,
Could you maybe explain what are you trying to perform ?
If trying to convert the dates to Month, the First Date does convert to August, However the Second date also converts to August.
Is that a typo from your end or is there a different Logic Involved.
For a Quick Check, try the below :
CDate("8/20/2022").ToString("MMMM")
Hi Check this
DateTime.ParseExact("8/20/2022","M/dd/yyyy",system.Globalization.CultureInfo.InvariantCulture).ToString("MMM/dd/yyyy")
DateTime.ParseExact("8/20/2022","M/dd/yyyy",system.Globalization.CultureInfo.InvariantCulture).ToString("MMMM/dd/yyyy")
Thanks,
HI @GDMM
Checkout this expression
DateTime.ParseExact("8/20/2022",{"M/d/yyyy","dd/MM/yyyy","d/M/yyyy","MM/dd/yyyy","MM/dd/yyyy hh:mm:ss"},System.Globalization.CultureInfo.InvariantCulture,System.Globalization.DateTimeStyles.None).ToString("MMMM")
Regards
Sudharsan
You can directly change the format ofthe cella in exce manually or using bot format cell or range activity and set the format to MMMM then it would directly display the month
Cheers
correction
if the column in excel says
8/20/2022
8/30/2020
must stay
August
August
must be the whole column
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.