shift DateTime to beginning or ending of the day
Posted on 2006-04-26
I have a call i am making in a property set:
if(value > this.datePicker.MaxDate)
9 times out of ten, this works fine, however, occasionaly the MaxDate has slightly fewer ticks than the value.
i want to totally disregard the time component of the DateTime ( though i need these objects to remain as DateTimes).
ultimatley, i just want to make sure value is on the same day or before max date.
if I call (date)value > (date)this.datePicker.MaxDate, will that work? If I call subtract, will that work correctly?