Board index » delphi » FormatDateTime('hh:mm',now)

FormatDateTime('hh:mm',now)

Hi,
Could anyone tell me why the FormatDateTime in this example returns a
time in the future(10 or 20 minutes)different to the time diplayed on
system tray?
edtTime.Text := FormatDateTime('hh:mm',now);
Thanks.
 

Re:FormatDateTime('hh:mm',now)


On 20 Mar 2002 04:57:22 -0800, martin_maxwe...@hotmail.com (MW) wrote:

Quote
>Hi,
>Could anyone tell me why the FormatDateTime in this example returns a
>time in the future(10 or 20 minutes)different to the time diplayed on
>system tray?
>edtTime.Text := FormatDateTime('hh:mm',now);
>Thanks.

Aren't you telling it to display hour:month instead of hour:minute?

Try 'hh:nn'

Michael

Re:FormatDateTime('hh:mm',now)


martin_maxwe...@hotmail.com (MW) wrote in news:4ee27cf7.0203200457.17353e88
@posting.google.com:

Quote
> Hi,
> Could anyone tell me why the FormatDateTime in this example returns a
> time in the future(10 or 20 minutes)different to the time diplayed on
> system tray?
> edtTime.Text := FormatDateTime('hh:mm',now);
> Thanks.

If FormatDateTime your are using is anything like Delphi's, then you need
to use 'hh:nn' as 'mm' means month.

Hope this helps,
Nick

Other Threads