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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Access DateDiff function 0
Datediff 2
DateDiff question 1
datediff 6
DateDiff & 30 days 7
DateDiff 3
Sum and DateDiff 2
show minutes not portions of hours in calculation 6

Back
Top