Question
May 14, 2007 at 01:35 AM
rajdeepsokhi

Help with Datediff function in MS Access

by rajdeepsokhi . Updated 19 years, 5 months ago

Hi,
I am trying to calculate the number of days between ‘today’ and a ‘date of birth’ field. In the field properties Default Value I am using =(DateDiff(‘y’,Date(),[dob]) where Date() gives today’s date and [dob] is my ‘date of birth’ field. However, this is not working. I get an error “(The database engine does not recognize either the field ‘dob’ in a validation expression, or the default value in the table ‘Table1’)”

I have set the data type for both fields to ‘Date/Time’. What am I doing wrong? Is there any alternate method?

Also, how can I calculate height in feet & inches (5’6″ or 5.6 or 5-6) from a given height in meters?

Thanks
Raj

This discussion is locked

All Comments