I am trying to fix a problem I have.
I have a datatable with 4,000 rows and a date format of 8/13/2022 11:35: 48 pm (mm/dd/yyyy hh:mm:ss) but what I need is (dd/mm/yyyy)
The data field name that I currently have is called “started” the new field can be called anything.
I can add a new column to the data table but not certain how to add the correct date to the new column
thanks
Gokul001
(Gokul Balaji)
September 8, 2022, 7:24am
2
Hi @adrian_sullivan
Have a look on the thread, to change the Date format
Hi ,
In the release Version 2019.2.0. I have added a new activity called Change Cell Type. It changes the format of the value like below.
[image]
In the Cell Format , can specify the custom format what we have in the excel Like below image.
[image]
Sample : UiPathGoExcel.zip (18.4 KB)
This is the video to configure the package in local.
Here is the link to know about the formats.
Regards
Balamurugan.S
Regards
Gokul
1 Like
not able to install the addin (corporate pc) so need to find another way
hi @adrian_sullivan ,
How about loop for each row and use string manipulation (Split, substring etc) and get the data you need? but it takes time consider your row is 4k
the time part i dont mind - it is just getting the manipulated results back into the datatable that is what is causing me the issue
Gokul001
(Gokul Balaji)
September 8, 2022, 7:57am
6
Hi @adrian_sullivan
You can try to convert the Date using CDate
CDate(CurrentRow("Column Name").ToString).ToString("dd/MM/yyyy")
Check out the XAML file
ChangeDateFormat.xaml (11.1 KB)
Output
Change Date.xlsx (7.1 KB)
Regards
Gokul
Hello again ,
here maybe you can try this workflow that i created
Excel_Filtering.zip (62.6 KB)
Hope fully this can help
that is giving me invalid file for when i try to open it
Gokul001
(Gokul Balaji)
September 8, 2022, 11:19am
9
Have you check this below XAML file @adrian_sullivan
Regards
Gokul
hi all, i tried the solutions above and they didnt work for me.
i created a very mini version of the file that is the source of my data table.
what i am trying to do is get from 9/1/2022 7:21:55 AM to 9/1/2022 MM/dd/yyyy or even dd/MM/yyyy.
i can add a new column or update the current column either option is good.
source csv
Status,Task,Started
Pass,task 1,9/1/2022 7:21:55 AM,
Fail,task 2,12/24/2020 11:54:56 PM,
Pass,task 1,8/16/2021 4:04:15 PM,
thanks
hi @adrian_sullivan
You can try the modern method in the below thread
@nilesay
You need to change the column type to date in excel right?
you can achieve it using a modern activity or BalaReva Activity
Check out this image and skeleton xaml file for modern
[image]
Sequence.xaml (8.2 KB)
Checkout this thread for Balareva activities
Regards
Sudharsan
Regards
Sudharsan
Gokul001
(Gokul Balaji)
September 21, 2022, 8:29am
12
Hi @adrian_sullivan
Check out the Updated XAML file
ChangeDateFormat.xaml (11.2 KB)
Output
Change Date1.xlsx (7.1 KB)
Regards
Gokul
1 Like
adrian_sullivan:
source csv
Status,Task,Started
Pass,task 1,9/1/2022 7:21:55 AM,
Fail,task 2,12/24/2020 11:54:56 PM,
Pass,task 1,8/16/2021 4:04:15 PM,
i have it working on a pc i have here with a new version of UiPath. when i run it on my work pc with an older version of UiPath i get an error about converting object to string.
very frustrating…
*** found the issue there was blank values in some of the rows. removed them and it works ok now
thanks
one more issue if i want to filter using date on this field what is the best way to do that. at the the moment if i run something like started > 14/08/2022 i am not getting any data back
system
(system)
Closed
September 24, 2022, 11:36am
16
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.