Waka
(Andy NG)
June 12, 2023, 6:45am
1
Hi expert
I wanted to write a excel cell with today’s date and format is dd/MM/yyyy, however when the write activity wrote the date into excel cell the format automatically changed to MM/dd/yyyy
I have used a message box to test the variable but the format changed when write in excel cell.
Below is the screenshot
Gokul001
(Gokul Balaji)
June 12, 2023, 6:50am
2
Hi @Waka
Use format cell activity to change the format as per your requirement
Check out this tutorial
Hello Everyone, Hope you are doing good
I would like to present this post who are looking for the Modern Activities
Very first thing is to Enable the Modern experience (from Classic)
Go to → Activities Panel → Click on Filter → Select Show Modern.
[image]
Let Jump into the Tutorial
we are look into some Modern activities
Find/Replace Value
Format Cells
Note : We need to use Excel Process Scope and Use Excel File for all the above activities
Excel Process scope
Use Excel File
…
Check out this thread
HI @Aakash_Singh_Rawat
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
[image]
Regards
Gokul
Hi @Baby123
Go to → Activities Panel → Click on Filter → Select Show Modern.
[image]
Step 1 : Use Excel process scope followed by Use Excel file activities .
Step 2 : Use Format Cell Activity,
Check out the XAML file
FormatCellStudioX.xaml (8.5 KB)
Regards
Gokul
Regards
Gokul
Yoichi
(Yoichi)
June 12, 2023, 6:51am
3
Hi,
Can you try FormatCells activity a the following?
OR
Add '
(single quote) at the begging of the date string?
Regards,
@Waka : Please refer to below screenshot working fine for me.
OutputFile screenshot:
Waka
(Andy NG)
June 12, 2023, 6:53am
5
Hi all
Below is my conversion method
Yoichi
(Yoichi)
June 12, 2023, 7:00am
6
Hi,
One of the simplest way, if it’s no problem the date is text type in the sheet, the following will help you.
"'" + todayDate.ToString
If the above is not good, it’s necessary to use FormatCells activity, for example.
Regards,
Waka
(Andy NG)
June 12, 2023, 7:04am
7
I can’t use “ ‘ “ +todaydate.tostring becoz at the later flow I would need to read the date again to filter the data table records
Yoichi
(Yoichi)
June 12, 2023, 7:09am
8
Hi,
All right. Can you try to use “UseExcelFile” ,“WeriteCell” and “Format Cells” as the following
Regards,