-
Date Comparison
If I want to only view records in between 2 dates, say everything between now and the last 7 days how would one write the code for that? I was reading the datediff information in the book I have but it only explained how to do it if you specified the 2 dates say:
DateDiff(DateInterval.Day, DateTime.Now, DateTime2)
where DatTime2 has to be a set date in the code or gotten from an input box, etc... Is there a way to tell it to go back 7 days from the first value?
Thanks ahead of time for any help!
-
YEAH!!!!
Great!!! I solved my own problem, to get the date range I wanted I used the following code:
If fields(0) < DateTime.Now And fields(0) > DateTime.Now.AddDays(-7) Then
whatever......
end if