DateOf() is nothing more than a wrapper for Trunc(TheDate) but I like to use it becuase then you know what its doing :-) BTW TimeOf(TheDate) returns only the time portion of a date/time and is just a wrapper for Frac(TheDate). Once agai I use this so I know what the code is doing.<br>
<br>Jeremy<br><br><div class="gmail_quote">On Tue, Jun 29, 2010 at 8:35 PM, David O'Brien <span dir="ltr"><<a href="mailto:Dave@iccs.co.nz">Dave@iccs.co.nz</a>></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;">
Just Trunc the DateTimePicker.Date...<br>
<div class="im"><br>
-----Original Message-----<br>
From: <a href="mailto:delphi-bounces@delphi.org.nz">delphi-bounces@delphi.org.nz</a> [mailto:<a href="mailto:delphi-bounces@delphi.org.nz">delphi-bounces@delphi.org.nz</a>]<br>
On Behalf Of John Bird<br>
</div><div><div></div><div class="h5">Sent: Tuesday, 29 June 2010 1:42 p.m.<br>
To: NZ Borland Developers Group - Delphi List<br>
Subject: [DUG] DateTimePicker<br>
<br>
When a TDateTime is set from a DateTimePicker that is being used for<br>
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<br>
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">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:<br>
unsubscribe<br>
<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>
</div></div></blockquote></div><br>