P
Paolo
I have a series of queries which select transactions (using a Transaction
date) within a specified date range, where the start and end dates
(inclusive) are selected from a DateTimePicker control thus:
DateTime qryStart;
DateTime qryEnd;
.....
qryStart = dtmpickFrom.Value;
qryEnd = dtmpickTo.Value;
var query =
from trans in dataSet.Transaction
where ((trans.T_Date >= qryStart)
&& (trans.T_Date <= qryEnd)) ....
I've just done my analysis for January 2009. I have a number of transactions
with dates of 01/01/2009 then more with later dates. I'm finding that with
qryStart = 01/01/2009 the transactions with that date are being omitted from
the analysis. Looking at qryStart in the debugger it shows '01/01/09
14:49:52' (where the time reflects the time at which I selected the date in
the DateTime Picker to do the analysis.) It just so happens that the
transactions with a date of 01/01/09 all have times earlier than 14:49:52 so,
presumably, this explains why they don't appear in the analysis.
I don't actually use the time part of the DateTime variables so is there any
way I can get the queries to ignore it?
date) within a specified date range, where the start and end dates
(inclusive) are selected from a DateTimePicker control thus:
DateTime qryStart;
DateTime qryEnd;
.....
qryStart = dtmpickFrom.Value;
qryEnd = dtmpickTo.Value;
var query =
from trans in dataSet.Transaction
where ((trans.T_Date >= qryStart)
&& (trans.T_Date <= qryEnd)) ....
I've just done my analysis for January 2009. I have a number of transactions
with dates of 01/01/2009 then more with later dates. I'm finding that with
qryStart = 01/01/2009 the transactions with that date are being omitted from
the analysis. Looking at qryStart in the debugger it shows '01/01/09
14:49:52' (where the time reflects the time at which I selected the date in
the DateTime Picker to do the analysis.) It just so happens that the
transactions with a date of 01/01/09 all have times earlier than 14:49:52 so,
presumably, this explains why they don't appear in the analysis.
I don't actually use the time part of the DateTime variables so is there any
way I can get the queries to ignore it?