datediff() what am I doing wrong?

  • Thread starter Thread starter rdrclshad
  • Start date Start date
R

rdrclshad

Guest
I have read many of the post concerning calculate age and it looks like using the datediff function would be the best for what I want (a text box on a report that lists the age) here is what I enter in the control source of the text box =DateDiff(wwww,Date(),DOB) where DOB is the field on the report that holds the date of birth. when I save it puts brackets around the [wwww] and when running the report it prombts for a user input. It is probaly something simple but I can't spot it. Thank you for your assistance
 
Try putting " around the datepart. EX "wwww".
 
Thank you it worked great. I also had the date reversed but that was easy to spot once it started giving me actual numbers. Thank you for your help
 

Users who are viewing this thread

Back
Top Bottom