Datific will return days of the year Access 2007

I have a column, which is stored as a data type of date and time, for which I will not count age in years. I am using the DateDiff function in Access 2007.

 SELECT Visits.ID, Visits.DOB, DateDiff("y",[DOB],[date]) AS age FROM Visits; 

As an answer to this question, I tried to use [date] to select the current date whenever a request is executed, but she just gave me an invitation to enter a date, she did not capture it automatically.

DOB is the date of birth of each entry.

+4
source share
1 answer

Specify "yyyy" for the interval argument instead of "y". "yyyy" is the year, "y" is the day of the year.

+5
source

Source: https://habr.com/ru/post/1398634/


All Articles