ayeo22
(ayeo22)
November 11, 2022, 12:40pm
1
Need help on this issue
I used Get Text activity to get a date from my Intranet page and the date is 01/10/2001
When I paste it into a Excel cell using Write Cell activity, it becomes 10/01/2001
The cell in Excel is in this format: 14/03/2012
How can I resolve this?
Gokul001
(Gokul Balaji)
November 11, 2022, 12:44pm
2
HI @ayeo22
You can try with Format Cell activity
Check out the XAML file
FormatCellStudioX.xaml (8.5 KB)
Regards
Gokul
Gokul001
(Gokul Balaji)
November 11, 2022, 12:49pm
3
Alternative method @ayeo22
DateTime.ParseExact(StringInput.ToString,"MM/dd/yyyy",System.Globalization.CultureInfo.InvariantCulture).ToString("dd/MM/yyyy")
Regards
Gokul
1 Like
ayeo22
(ayeo22)
November 11, 2022, 12:50pm
4
let me try this on Monday, thank you
Gokul001
(Gokul Balaji)
November 11, 2022, 12:51pm
5
Let us know, If you face any issue @ayeo22
ayeo22
(ayeo22)
November 11, 2022, 1:01pm
6
I get this error:
Write Cell: The DateTime represented by the string is not supported in calendar System.Globalization.GregorianCalendar
Gokul001
(Gokul Balaji)
November 11, 2022, 1:02pm
7
HI @ayeo22
Use Assign activity
DateTime.ParseExact(StringInput.ToString,"MM/dd/yyyy",System.Globalization.CultureInfo.InvariantCulture).ToString("dd/MM/yyyy")
Can you share the sample excel file
Regards
Gokul
1 Like
Gokul001
(Gokul Balaji)
November 11, 2022, 1:06pm
8
Check out the XAML file
FormatDateStudio.xaml (7.2 KB)
Regards
Gokul
ayeo22
(ayeo22)
November 11, 2022, 1:11pm
9
BotTest.xlsx (8.4 KB)
Sample Excel file - sorry I had to create this as the original file is rated confidential
Would prefer a ParseExact solution if possible
Gokul001
(Gokul Balaji)
November 11, 2022, 1:17pm
10
HI @ayeo22
Check out the XAML file
FormatDateStudio.xaml (7.5 KB)
Output
Regards
Gokul
ayeo22
(ayeo22)
November 11, 2022, 1:22pm
11
Thanks a million, Gokul001
1 Like
system
(system)
Closed
November 14, 2022, 1:23pm
12
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.