hey guys im trying to sort a column on a csv file base on date, but i always get this error
i tried using column dt.Columns(“column name”) , using index 1 (the second column), using column name as “column name” but no luck.
this is my workflow
any help would be appreciated, thanks
Hi @RobertoEwaldo
Try this post:
try this
(From row In filteredSchemaDT Order By DateTime.ParseExact(row.Item("RECEIPTDATE").ToString, "dd/MM/yyyy",
System.Globalization.CultureInfo.InvariantCulture) Descending Select row).CopyToDataTable
Thanks,
Prankur
Let know if this works for you
rahatadi
(Aditya Rahatekar)
April 22, 2019, 5:49am
3
@RobertoEwaldo
can you please upload CSV?
rahatadi
(Aditya Rahatekar)
April 22, 2019, 6:04am
6
@RobertoEwaldo
csv 2.zip (3.3 KB)
please check and let me know…
it’s not error, but it’s not sorted
rahatadi
(Aditya Rahatekar)
April 22, 2019, 6:31am
9
@RobertoEwaldo
it is sorted but in descending order as sort activity is set to “descending”.
just set to “ascending” to get data in ascending order.
look at row 15 & 16 and the months
i think it’s sorted based on the dates only @rahatadi
rahatadi
(Aditya Rahatekar)
April 22, 2019, 7:27am
13
@RobertoEwaldo
try this.
Sequence.xaml (6.6 KB)
regards
Aditya
rahatadi
(Aditya Rahatekar)
April 22, 2019, 7:58am
15
@RobertoEwaldo
no problem,
if you have any difficulties, feel free to ask me
rahatadi
(Aditya Rahatekar)
April 24, 2019, 5:39am
17
@RobertoEwaldo
dose provided workflow solved your issue? or still needs some changes ?
Regards,
Aditya