Hi everyone i will get the input form excel sheet and i need to modify the date formates and write back to excel how can i do that
Example Input : 22-aug-2022 and more like this.
But, i need as output of this “dd.MM.yyyy”. This format.
Hi everyone i will get the input form excel sheet and i need to modify the date formates and write back to excel how can i do that
Example Input : 22-aug-2022 and more like this.
But, i need as output of this “dd.MM.yyyy”. This format.
Hi,
It’s same as the following topic. Can you try to use DateTime.ParseExact or CDate?
Regards,
Basically your getting data from excel
1.take read range activity to read excel and pass in for each row activity
2.Inside the loop
Take assign activity and pass like this
CurrentRow(“yourcolumn”) = Cdate(yourcolumn).Tostring(“dd.MM.yyyy”)
3.At the end out of loop write to excel by write range workbook activity
Hope it will help
Hi @Venkata_Swami ,
you can try
Cdate(yourString).Tostring(“dd.MM.yyyy”)
regards,
Input= "22-aug-2022"
Output=DateTime.ParseExact(Input,"dd-MMM-yyyy", System.Globalization.CultureInfo.InvariantCulture).ToString("dd.MM.yyyy")
Output is of Data type System.String.
Other way is
Input= "22-aug-2022"
Output= Cdate(Input).Tostring("dd.MM.yyyy")
Output is of Data type System.String.
Hope it helps
How can i write back to excel
@Yoichi
How can i write back to excel
Try this in assign activity inside the loop
CurrentRow(“yourcolumn”) = Cdate(yourcolumn).Tostring(“dd.MM.yyyy”)
At the end out off for each row use the write range workbook activity so it will change
Hi @Venkata_Swami ,
You have data table has row(“A”)
you can assign
row('A")=Cdate(row(“A”).ToString).Tostring(“dd.MM.yyyy”)
or write cell
with
Cdate(row(“A”).ToString).Tostring(“dd.MM.yyyy”)
my in/out
my code
Convert Time.zip (11.0 KB)
hope it help,
regards,
For each row in excel
Assign:
row("DateColumn") = DateTime.ParseExact(row("DateColumn").ToString(), "dd-MMM-yyyy", System.Globalization.CultureInfo.InvariantCulture).ToString("dd.MM.yyyy")
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.