Hi,
In the excel date format will be MM/dd/yyyy. how can i achieve below?
Excel Date2 |
Actual Result |
Expected Result |
11-04-2022 |
04-11-2022 |
11-04-2022 |
09-03-2022 |
03-09-2022 |
09-03-2022 |
04-24-2022 |
04-24-2022 |
04-24-2022 |
12-25-2023 |
12-25-2023 |
12-25-2023 |
Thanks
Uma
Gokul001
(Gokul Balaji)
2
Hi @Umadevi_Sanjeevi
How about this expression
DateTime.ParseExact(CurrentRow("Column Name").ToString.Trim,"dd-MM-yyyy",System.Globalization.CultureInfo.InvariantCulture).ToString("MM/dd/yyyy")
Note : dd-MM-yyyy -> Based on excel date fomat
Or
You can try to change the format of the column
-
Excel process scope activity
-
Use excel file activity
-
Format cell activity

Or
Try with BalaReva package
Regards
Gokul
1 Like
Hi Gokul,
I’m getting below error.
Error : Assign: String was not recognized as a valid DateTime.
Thanks
Hey!
Try this:
- Read excel using read range output as → Dt_Out
- Take one for each row in data table activity and pass the Dt_Out
Now take one assign activity and create one string variable called InputDate and pass the expression like this…
Datetime.ParseExact(CurrentRow("ColumnName").ToString, "dd-MM-yyyy", System.Globalization.CultureInfo.InvariantCulture).ToString("dd-MM-yyyy")
Regards,
NaNi
Gokul001
(Gokul Balaji)
5
Can you share the sample excel file @Umadevi_Sanjeevi
I have update my previous post check it out
Hi Thiru,
Getting this Error : Assign: String was not recognized as a valid DateTime.
Thanks
Hi Gokul,
Tried Change format activity. But why we need to change date format. Already the date format will be MM-dd-yyyy.
Bad luck facing same issue.
Sample Data below:
Date2 |
Actual Result |
Expected Result |
11-04-2022 |
04-11-2022 |
11-04-2022 |
09-03-2022 |
03-09-2022 |
09-03-2022 |
04-24-2022 |
04-24-2022 |
04-24-2022 |
12-25-2023 |
12-25-2023 |
12-25-2023 |
Thanks
Gokul001
(Gokul Balaji)
8
Share the excel file @Umadevi_Sanjeevi
Gokul001
(Gokul Balaji)
9
While seeing the excel it show like MM-dd-yyyy
format. While automating it will give different format.
What was the error while changing the format?
Regards
Gokul
Hello @Umadevi_Sanjeevi
If you need to get the dates from excel in the format dd-mm-yyyy, then you can use Modify Date activity.
Thanks