How to assign value in datetime list variable

HI @Aleem_Khan

Try like this

New List(of DateTime) From{DateTime.ParseExact("4/5/2022 1:02 PM","d/M/yyyy h:mm tt",nothing),DateTime.ParseExact("4/5/2022 3:39 PM","d/M/yyyy h:mm tt",nothing),DateTime.ParseExact("4/5/2022 3:28 PM","d/M/yyyy h:mm tt",nothing),DateTime.ParseExact("4/5/2022 1:15 PM","d/M/yyyy h:mm tt",nothing)}

To sort use this

String.Join(",",list.OrderBy(Function(s) s))

Hope this helps

Regards
Sudharsan

1 Like