Date older thn a specific date

Hi,

I want to find dates older then 2018-08-05

below is the variable that i created
ReferenceDate = DateTime.ParseExact((“2018-08-05”).ToString, “yyyy-MM-dd”, CultureInfo.InvariantCulture)

below is the cod that i used:

ReferenceDate.CompareTo(DateTime.ParseExact(row(“Date”).ToString, “yyyy-MM-dd”, CultureInfo.InvariantCulture)) < 0

however, its returning entries new then the mentioned date. How to make this work to show older entries . I tried replacing < with >. However, it didnt work.

Assistance would be highly appreciated

@Yousuf_Ali Refer this zip file

1 Like

Sorry my mistake…There were no dates older thn the one i mentioned in the database…so replacing < with > worked.

1 Like