in my experience, the &quot;DatePicker1.date&quot; only returns the date part of the date in the control i.e. no time portion. If you want to be double sure you can do DateOf(DatePicker1.Date)<br><br>Jeremy<br><br><div class="gmail_quote">
On Tue, Jun 29, 2010 at 2:20 PM, Colin Johnsun <span dir="ltr">&lt;<a href="mailto:colin.adug@gmail.com">colin.adug@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
If you are only interested in the Date part of the TDateTime you could always use the Trunc function.<div><br></div><div>ie. if Trunc(DatePicker1.Date) = Date then...</div><div><br></div><div>Cheers,</div><div>Colin</div>
<div><div></div><div class="h5"><div>
<br><div class="gmail_quote">On 29 June 2010 11:42, John Bird <span dir="ltr">&lt;<a href="mailto:johnkbird@paradise.net.nz" target="_blank">johnkbird@paradise.net.nz</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

When a TDateTime is set from a DateTimePicker that is being used for Date<br>
selections what is set for the time component?  Or is it random?   I am<br>
wondering because two different pickers seem to return unrelated times and<br>
it looks like  I have to do some testing and correcting.<br>
<br>
And for testing - I think that a test such as<br>
<br>
if DatePicker1.date = date then......<br>
<br>
might not be a reliable test (if both are effectively floating point)<br>
<br>
This is D5 in case later versions have smarter testing....<br>
<br>
John<br>
<br>
<br>
_______________________________________________<br>
NZ Borland Developers Group - Delphi mailing list<br>
Post: <a href="mailto:delphi@delphi.org.nz" target="_blank">delphi@delphi.org.nz</a><br>
Admin: <a href="http://delphi.org.nz/mailman/listinfo/delphi" target="_blank">http://delphi.org.nz/mailman/listinfo/delphi</a><br>
Unsubscribe: send an email to <a href="mailto:delphi-request@delphi.org.nz" target="_blank">delphi-request@delphi.org.nz</a> with Subject: unsubscribe<br>
</blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
NZ Borland Developers Group - Delphi mailing list<br>
Post: <a href="mailto:delphi@delphi.org.nz">delphi@delphi.org.nz</a><br>
Admin: <a href="http://delphi.org.nz/mailman/listinfo/delphi" target="_blank">http://delphi.org.nz/mailman/listinfo/delphi</a><br>
Unsubscribe: send an email to <a href="mailto:delphi-request@delphi.org.nz">delphi-request@delphi.org.nz</a> with Subject: unsubscribe<br></blockquote></div><br>