Time in seconds to mins and seconds

  • Thread starter Thread starter Neal
  • Start date Start date
N

Neal

Hi there.

We have times recorded as seconds. eg 32.12 sec, 75.23 sec and 122.45 sec
but would like them displayed by a query as 32.12 sec, 1 min 15.23 sec and 2
min 2.45 sec.

I've tried all sorts of things, but can't make it work. Any help greatly
appreciated thanks!

Neal
 
Try

IIf([FieldName] > 60, int([FieldName]/60) & " Minutes ","") & [FieldName]
- int([FieldName]/60)*60 & " Seconds"
 
Thanks for that! It works perfectly. I was close, but didn't use the IIF.
I'd never have gotten it.

(-:

Ofer said:
Try

IIf([FieldName] > 60, int([FieldName]/60) & " Minutes ","") &
[FieldName]
- int([FieldName]/60)*60 & " Seconds"

--
\\// Live Long and Prosper \\//
BS"D


Neal said:
Hi there.

We have times recorded as seconds. eg 32.12 sec, 75.23 sec and 122.45
sec
but would like them displayed by a query as 32.12 sec, 1 min 15.23 sec
and 2
min 2.45 sec.

I've tried all sorts of things, but can't make it work. Any help greatly
appreciated thanks!

Neal
 
Found one tiny thing. There should be a leading 0 if the time is in the
range of 1:00 to 1:09.

At the moment I see a time of 1:12.25 which is correct, but another of
1:5.12 which should be 1:05.12

Thanks, Neal

Ofer said:
Try

IIf([FieldName] > 60, int([FieldName]/60) & " Minutes ","") &
[FieldName]
- int([FieldName]/60)*60 & " Seconds"

--
\\// Live Long and Prosper \\//
BS"D


Neal said:
Hi there.

We have times recorded as seconds. eg 32.12 sec, 75.23 sec and 122.45
sec
but would like them displayed by a query as 32.12 sec, 1 min 15.23 sec
and 2
min 2.45 sec.

I've tried all sorts of things, but can't make it work. Any help greatly
appreciated thanks!

Neal
 
Add format to the seconds

IIf([FieldName] > 60, int([FieldName]/60) & " Minutes ","") &
Format([FieldName]
- int([FieldName]/60)*60,"00") & " Seconds"

--
\\// Live Long and Prosper \\//
BS"D


Neal said:
Found one tiny thing. There should be a leading 0 if the time is in the
range of 1:00 to 1:09.

At the moment I see a time of 1:12.25 which is correct, but another of
1:5.12 which should be 1:05.12

Thanks, Neal

Ofer said:
Try

IIf([FieldName] > 60, int([FieldName]/60) & " Minutes ","") &
[FieldName]
- int([FieldName]/60)*60 & " Seconds"

--
\\// Live Long and Prosper \\//
BS"D


Neal said:
Hi there.

We have times recorded as seconds. eg 32.12 sec, 75.23 sec and 122.45
sec
but would like them displayed by a query as 32.12 sec, 1 min 15.23 sec
and 2
min 2.45 sec.

I've tried all sorts of things, but can't make it work. Any help greatly
appreciated thanks!

Neal
 
Back
Top