E
Eddie
I have a DataTable.Select() statement with a DateTime field that is
being compared to a Date:
Dim drCal as DataRow() = tblCal.Select("CalendarItemDate
='12/1/2003'", "CalendarItemDate", DataViewRowState.CurrentRows)
This never returns any rows because all the CalendarItemDate fields
that contain the date 12/1/2003 also contain a time component! I
searched until I was SICK and could not find how to truncate the time
from the DateTime field in the Select expression.
I would prefer to do it in the Select expression, but if I have to add
another field to the SQL statement that populates the DataSet, I guess
that will have to do. However, MS SQL 2000 no longer has the Trunc()
function!! I guess I have to use Round(n,0,1)??
Thanks in advance for any clues.
Cheers
Eddie
being compared to a Date:
Dim drCal as DataRow() = tblCal.Select("CalendarItemDate
='12/1/2003'", "CalendarItemDate", DataViewRowState.CurrentRows)
This never returns any rows because all the CalendarItemDate fields
that contain the date 12/1/2003 also contain a time component! I
searched until I was SICK and could not find how to truncate the time
from the DateTime field in the Select expression.
I would prefer to do it in the Select expression, but if I have to add
another field to the SQL statement that populates the DataSet, I guess
that will have to do. However, MS SQL 2000 no longer has the Trunc()
function!! I guess I have to use Round(n,0,1)??
Thanks in advance for any clues.
Cheers
Eddie