Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

TDateTime converting to local TDateTime

0 views
Skip to first unread message

Romeo I

unread,
Jul 25, 2002, 11:46:28 AM7/25/02
to
Hi

Small problem here. Let愀 say that i have a TDateTime like this on a
European Computer that uses the this TDateTime format.

5/6/2002 23:10:23

And i send this to an US computer. Now US don愒 use the 24 hour system but
the 12 hour and the date looks a little different. How can i format the
TDateTime value so it will be dispalyed correctly to any user on a windows
machine?

Is there a DateTimeToLocal?

Thanx In Advance
Romeo


Mike Williams (TeamB)

unread,
Jul 25, 2002, 11:49:31 AM7/25/02
to
On 25 Jul 2002, "Romeo I" <romeo_i...@hotmail.com> wrote:

> Small problem here. Let's say that i have a TDateTime like this on a


> European Computer that uses the this TDateTime format.
>
> 5/6/2002 23:10:23
>

> And i send this to an US computer. Now US don't use the 24 hour system


> but the 12 hour and the date looks a little different. How can i
> format the TDateTime value so it will be dispalyed correctly to any
> user on a windows machine?

How are you "sending" the data? If you send it as a floating point
number instead of a string you won't have to worry about regional date
formatting issues.

--
-Mike (TeamB)

Romeo I

unread,
Jul 25, 2002, 3:31:09 PM7/25/02
to
I was thinking that i will use Now function to retrieve the current date and
time and the save it to a file as a string. And when the other user on a
differnet computor. it will read the string that the is in the file and the
date and time will be formated to his "local". So if a time looks like this
23:10:01 it will look like this IF he uses US-time:
11:10:01 AM

How can i do this?

How do i convert a TDateTime to a floating point. Can you show me an
example?

Thanx In Advance,
Romeo


"Mike Williams (TeamB)" <mi...@remove.aps-soft.com> skrev i meddelandet
news:Xns9256784C95...@207.105.83.65...

Mike Williams (TeamB)

unread,
Jul 25, 2002, 3:43:32 PM7/25/02
to
On 25 Jul 2002, "Romeo I" <romeo_i...@hotmail.com> wrote:

> How do i convert a TDateTime to a floating point. Can you show me an
> example?

It already is a floating point number.

Caption := Format('%0.5f', [Now]);

--
-Mike (TeamB)

0 new messages