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

Grabbing milliseconds

3 views
Skip to first unread message

JonnyCabŽ

unread,
May 12, 2000, 3:00:00 AM5/12/00
to
Hola,

Is there any way to get milliseconds from Delphi 4? Something like

formatdatetime('YYYY/MM/DD HH:NN:SS:---',now); where --- is the
milliseconds field???

I'd like to be able to use milliseconds with some fields in SQL Server 7.

Thanks!

Franz-Josef Karli

unread,
May 12, 2000, 3:00:00 AM5/12/00
to JonnyCab®
What would You like more than You get ;-) FJK

var
Hour, Min, Sec, MSec: Word;
begin
DecodeTime(Time, Hour, Min, Sec, MSec);
end;

JonnyCabŽ

unread,
May 12, 2000, 3:00:00 AM5/12/00
to
Brain cramp...ttimestamp...nevermind. :)

JonnyCabŽ

unread,
May 12, 2000, 3:00:00 AM5/12/00
to
"Franz-Josef Karli" <f...@cuenet.ch> wrote in message
news:391C17E2...@cuenet.ch...

> What would You like more than You get ;-) FJK

:) I know. I plead temporary insanity. I used ttimestamp.

Thanks!

John Mertus

unread,
May 23, 2000, 3:00:00 AM5/23/00
to
Just be aware that ttimestamp uses the system time clock. Thus its
resoulution
is 10 milliseconds for NT, 9x, I don't know about 2000.

-John_...@Brown.EDU

niLLer

unread,
May 24, 2000, 3:00:00 AM5/24/00
to
> Is there any way to get milliseconds from Delphi 4? Something like

Try GetTickCount. Returns number of miliseconds since Windows started.

niLLer

Syber

unread,
Jul 19, 2000, 3:00:00 AM7/19/00
to
Breaks a TDateTime value into hours, minutes, seconds, and milliseconds.

Unit

Sysutils

Category

date/time routines

procedure DecodeTime(Time: TDateTime; var Hour, Min, Sec, MSec: Word);

Description

DecodeTime breaks the object specified as the Time parameter into hours,
minutes, seconds, and milliseconds.

or use EncodeTime to reverse

"JonnyCabŽ" wrote:

> Hola,


>
> Is there any way to get milliseconds from Delphi 4? Something like
>

0 new messages