[DUG] DateTimePicker
Jeremy Coulter
jscoulter at gmail.com
Tue Jun 29 14:24:51 NZST 2010
in my experience, the "DatePicker1.date" 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)
Jeremy
On Tue, Jun 29, 2010 at 2:20 PM, Colin Johnsun <colin.adug at gmail.com> wrote:
> If you are only interested in the Date part of the TDateTime you could
> always use the Trunc function.
>
> ie. if Trunc(DatePicker1.Date) = Date then...
>
> Cheers,
> Colin
>
> On 29 June 2010 11:42, John Bird <johnkbird at paradise.net.nz> wrote:
>
>> When a TDateTime is set from a DateTimePicker that is being used for Date
>> selections what is set for the time component? Or is it random? I am
>> wondering because two different pickers seem to return unrelated times and
>> it looks like I have to do some testing and correcting.
>>
>> And for testing - I think that a test such as
>>
>> if DatePicker1.date = date then......
>>
>> might not be a reliable test (if both are effectively floating point)
>>
>> This is D5 in case later versions have smarter testing....
>>
>> John
>>
>>
>> _______________________________________________
>> NZ Borland Developers Group - Delphi mailing list
>> Post: delphi at delphi.org.nz
>> Admin: http://delphi.org.nz/mailman/listinfo/delphi
>> Unsubscribe: send an email to delphi-request at delphi.org.nz with Subject:
>> unsubscribe
>>
>
>
> _______________________________________________
> NZ Borland Developers Group - Delphi mailing list
> Post: delphi at delphi.org.nz
> Admin: http://delphi.org.nz/mailman/listinfo/delphi
> Unsubscribe: send an email to delphi-request at delphi.org.nz with Subject:
> unsubscribe
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20100629/595641f6/attachment.html
More information about the Delphi
mailing list