DateDiff

mithani

Registered User.
Local time
Tomorrow, 07:30
Joined
May 11, 2007
Messages
291
Dear All,

I have two date text boxes and I want to calculate the days difference between two dates. I have put this code but not working.

=NZ(DateDiff("d",[date],[week_ending_date]))

Can anyone help me please?

mithani
 
You may find yourself in a bad situation due to the field name, or text box, name "date." You should never use an Access Reserved Key Word as a name of an object or field.

Change the name and then refer to it on the form like:

=DateDiff("d", Me.YourDateField, Me.Week_Ending_Date)
 
Oh thanks bob, so kind of you.

mithani
 

Users who are viewing this thread

Back
Top Bottom