Hi guys,
I have a excel sheet having date in dd/MM/yyyy (01/04/2022) and MM/dd/yyyy (04/01/2022) both format.
I want to strong parse these to MM/dd/yyyy whether it is already in MM/dd/yyyy format or any other format.
Hi guys,
I have a excel sheet having date in dd/MM/yyyy (01/04/2022) and MM/dd/yyyy (04/01/2022) both format.
I want to strong parse these to MM/dd/yyyy whether it is already in MM/dd/yyyy format or any other format.
Try using format cells activity.
Checkout this expression
DateTime.ParseExact("Your date variable",{"dd/MM/yyyy","MM/dd/yyyy","Any other formats"},System.Globalization.CultureInfo.InvariantCulture,System.Globalization.DateTimeStyles.None).ToString("MM/dd/yyyy")
Regards
Sudharsan
DateTime.ParseExact(CurrentRow("DateColumn NAme").Tostring,{"dd/MM/yyyy","MM/dd/yyyy","Any other formats"},System.Globalization.CultureInfo.InvariantCulture,System.Globalization.DateTimeStyles.None).ToString("MM/dd/yyyy")
You can check and add any other formats inside those {“Other format 1”,“Other format 2”}
Regards
Sudharsan
You can try with strong Date Parsing
DateTime.ParseExact("Jan 01, 2022",{"MMM dd, yyyy","MMM d, yyyy","dd/MM/yyyy","MM/dd/yyyy"},System.Globalization.CultureInfo.InvariantCulture,System.Globalization.DateTimeStyles.None).ToString("MM/dd/yyyy")
Output
Regards
Gokul
Hello @Aakash_Singh_Rawat
You can use format cell activity in modern activity
If you are a classic user, follow this
Check out this tutorial @Aakash_Singh_Rawat
Hello @Aakash_Singh_Rawat
You need to loop through the excel and then use the Format cellss activity. You can set the required format in the format cells activity.
Another approach is using the FoRMAT Range activity.
Thanks
Thank you @GT_Ropa,
It worked.
Thank you @Gokul_Jayakumar. It worked.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.