I have a datatable populated from a page. I build a datatable after selecting correct data types for rows and then used this as the output var for extracting data. Datatable has a datetime column to store the date from excel. I am trying to filter rows based on a date like below
dt.Select("[Date]>’"+DateTest+"’").CopyToDataTable
DateTest holds the value ‘2020-02-01’. I am getting the correct results ,ie, i am getting all rows after 1st Februrary 2020.
My doubt is whether this is the right way to compare as in other languages we normally convert the string to the date format and then compare… Here i have compared a string with date, hence the confusion.
Please help.