add/ subtraxct time with milleseconds

  • Thread starter Thread starter Nena
  • Start date Start date
N

Nena

Hi,

I am trying to make calculations with time.

My table has 2 coluns with time as Intreger and no format, (ex. 1000378)
this must be as 10:00:378 (mm:ss:dscsms).

I need to add 2 fields, i have some exemples but i just can't get this
working.

Could some one give me some help.
Thanks

Helena
(sorry for my bad english)
 
Hi,

I am trying to make calculations with time.

My table has 2 coluns with time as Intreger and no format, (ex. 1000378)
this must be as 10:00:378 (mm:ss:dscsms).

So... this number is in a mixture of base 60 and base 10, depending on
the position??? OUCH.

I would REALLY STRONGLY suggest storing the time in a Long Integer
count of milliseconds, i.e. this would be 600378. You can DISPLAY it
in minutes:seconds format with an expression like

[duration] \ 60000 & Format([duration] - [duration] \ 60000,
":00.000")

If you're stuck with the current format, use 100000 in place of 60000.
I need to add 2 fields, i have some exemples but i just can't get this
working.

I have no trace of an idea what "2 fields" you want to add. In any
case you should certainly not add new fields to your Table, they'd be
redundant.
Could some one give me some help.

Please explain what final result you want, and where your oddly
formatted number is coming from. Do you have any control over its
format?

John W. Vinson[MVP]
 
Hi John,

Thanks for reply.

John Vinson said:
So... this number is in a mixture of base 60 and base 10, depending on
the position??? OUCH.
This number came form a txt that is import from a chronometer.
The txt is import to access and the time is imported as Long Integer but it
is a time ( import: 100378 and this is 1.00.378 - mm.ss.dscsms).
piloto lixoporta lixohoras tempo - Time
000 2 00 0
001 2 00 37920
005 2 00 53364
010 2 00 100378
001 2 00 133121
005 2 00 147979
010 2 00 158038

I would REALLY STRONGLY suggest storing the time in a Long Integer
count of milliseconds, i.e. this would be 600378. You can DISPLAY it
in minutes:seconds format with an expression like

[duration] \ 60000 & Format([duration] - [duration] \ 60000,
":00.000")

If you're stuck with the current format, use 100000 in place of 60000.
I need to add 2 fields, i have some exemples but i just can't get this
working.

I have no trace of an idea what "2 fields" you want to add. In any
case you should certainly not add new fields to your Table, they'd be
redundant.
Sorry, i want to say that a need to sum 2 rows, in the above i need to
subtract the time second from driver 001 - first time off same driver
(133121 - 37920)
Please explain what final result you want, and where your oddly
formatted number is coming from. Do you have any control over its
format?

I dont have any control over the format that i import because its came from
Hyperterminal
I need to calculate the diference between the first time for the driver, and
print it as time with milleseconds (1:00:378).
This is a dase to analise times in a race and give best times in race,
averages, and the position off the driver.
Hope that i explain it better.
Thanks again

Nena
 
Back
Top