datediff with now()

rikklaney1

Registered User.
Local time
Today, 12:17
Joined
Nov 20, 2014
Messages
157
I have a text box on a form that I want to return the minutes remaining between now and a time, in this case 3:40 pm. Here is what I have in the control source for the text box

=DateDiff("n",Now(),#3:40:00 PM#)

the result is -10,545,100.00

I'm no math genuis but I think this number is wrong. If I replace now() with an actual time it calculates correctly so I assume it's an issue with now(). Anybody have any ideas on how to make this work?
 
Suggest you use Time() instead of Now. Now gives Date and Time.

eg DateDiff("n",Time(),#3:40:00 PM#)
 
Brilliant. That did it. Thanks.
 

Users who are viewing this thread

Back
Top Bottom