Original Date Format change from 01/10/2001 becomes 10/01/2001 when pasted into Excel

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?

HI @ayeo22

You can try with Format Cell activity

Check out the XAML file

FormatCellStudioX.xaml (8.5 KB)

image

Regards
Gokul

Alternative method @ayeo22

DateTime.ParseExact(StringInput.ToString,"MM/dd/yyyy",System.Globalization.CultureInfo.InvariantCulture).ToString("dd/MM/yyyy")

image

Regards
Gokul

1 Like

let me try this on Monday, thank you

Let us know, If you face any issue @ayeo22

I get this error:
Write Cell: The DateTime represented by the string is not supported in calendar System.Globalization.GregorianCalendar

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

Check out the XAML file

FormatDateStudio.xaml (7.2 KB)

image

Regards
Gokul

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

HI @ayeo22

Check out the XAML file

FormatDateStudio.xaml (7.5 KB)

image

Output

image

Regards
Gokul

Thanks a million, Gokul001

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.