Hi, I'm trying to extract records from an access database. I pass a date to the query and i want to retrieve records where my date is between TASK_START_DATE Column and TASK_FINISH_DATE Column.
In the database dates have also time
e.g.
TASK_START_DATE= "08/08/2009 7.00.00"
TASK_FINISH_DATE = "08/12/2009 16.00.00"
if I pass a date e.g. "08/10/2009", I cant retrieve record starting "08/10/2009" unless starting exactly at 08/10/2009 0:0:0.
I thought to reset to 0:0:0 the time information from the db date, but how can I do it?
Thanks
VB.NET:
Dim queryString As String = "SELECT * FROM(MSP_TASKS) " & _
"WHERE (@data BETWEEN TASK_START_DATE AND TASK_FINISH_DATE) " & _
"AND (TASK_IS_MARKED = TRUE)"
In the database dates have also time
e.g.
TASK_START_DATE= "08/08/2009 7.00.00"
TASK_FINISH_DATE = "08/12/2009 16.00.00"
if I pass a date e.g. "08/10/2009", I cant retrieve record starting "08/10/2009" unless starting exactly at 08/10/2009 0:0:0.
I thought to reset to 0:0:0 the time information from the db date, but how can I do it?
Thanks