test.xlsx (7.1 KB)
Attached the excel file data that will be available in Data Table.
Is it possible to split “Created:” and Date & “Auto process Date” and Date from “New Column 0” in the DT. and create two new columns 1.Created 2. Auto process Date and add the respective values
Expected output:
Yoichi
(Yoichi)
September 27, 2023, 5:36am
2
Hi,
How about the following sample?
dtResult = dt.AsEnumerable.Select(Function(r) dtResult.LoadDataRow({System.Text.RegularExpressions.Regex.Match(r(0).ToString,"(?<=Created\D+)\d+/\d+/\d+").Value,System.Text.RegularExpressions.Regex.Match(r(0).ToString,"(?<=Auto Process Date\D+)\d+/\d+/\d+").Value,r(1),r(2)},False)).CopyToDataTable()
Sample20230927-6L.zip (8.5 KB)
Regards,
1 Like
get.xaml (11.8 KB)
Here is the xaml,try out
—>output
How to sort the final DT in descending order based on “Created” Column and store in to DT.
Yoichi
(Yoichi)
September 27, 2023, 7:32am
6
HI,
How about the following sample?
dtResult = dt.AsEnumerable.Select(Function(r) dtResult.LoadDataRow({System.Text.RegularExpressions.Regex.Match(r(0).ToString,"(?<=Created\D+)\d+/\d+/\d+").Value,System.Text.RegularExpressions.Regex.Match(r(0).ToString,"(?<=Auto Process Date\D+)\d+/\d+/\d+").Value,r(1),r(2)},False)).OrderByDescending(Function(r) CDate(r("Created").ToString)).CopyToDataTable()
Sample20230927-6L (2).zip (9.8 KB)
Regards,
2 Likes
Input.xlsx (10.5 KB)
Thank you for your support.
Added few extra columns in input file … and few values are missing in output file
Attached both new input file & result
result.xlsx (6.9 KB)
Expected output :
Can you check my request?
Which name spaces needs to import to use this method in another project?
Yoichi
(Yoichi)
September 27, 2023, 10:27am
10
Hi,
Can you check the following sample?
Sample20230927-6Lv3.zip (21.7 KB)
Regards,
1 Like
system
(system)
Closed
September 30, 2023, 10:28am
11
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.