DateDiff

  • Thread starter Thread starter Leslie Isaacs
  • Start date Start date
L

Leslie Isaacs

Hello All
Does DateDiff always have to return an integer?
I would like it to return the actual difference, in minutes, to say 3
decimal places.
I realise I could get the minutes, then the seconds, then do some maths, but
surely it should be easier than that?
Grateful for any help.
Leslier Isaacs
 
Yes DateDiff always returns a count of units of time (and count implies integers).

You could get just the seconds and then divide that my 60 to get minutes to some
decimal place

CCur(DateDiff("s",[StartDateTime],[EndDateTime])/60) should give you a number
of minutes that is accurate to 4 decimal places.
 
Thanks John - obvious really!
Les.


John Spencer (MVP) said:
Yes DateDiff always returns a count of units of time (and count implies integers).

You could get just the seconds and then divide that my 60 to get minutes to some
decimal place

CCur(DateDiff("s",[StartDateTime],[EndDateTime])/60) should give you a number
of minutes that is accurate to 4 decimal places.



Leslie said:
Hello All
Does DateDiff always have to return an integer?
I would like it to return the actual difference, in minutes, to say 3
decimal places.
I realise I could get the minutes, then the seconds, then do some maths, but
surely it should be easier than that?
Grateful for any help.
Leslier Isaacs
 
Back
Top