Date difference calculation in Access
Good day?
I am an intern at a transportation company and I need to create a DBMS (SGBDR) to manage drivers' payrolls (with bonus, vacations...). To calculate seniority, I ran into a (first) difficulty. I think we should compute the difference between the hire date and today's date. The problem is that in the query I can't find the syntax. Anybody can help me, please? Thanks in advance. Mika_gengen. I will be back!
I am an intern at a transportation company and I need to create a DBMS (SGBDR) to manage drivers' payrolls (with bonus, vacations...). To calculate seniority, I ran into a (first) difficulty. I think we should compute the difference between the hire date and today's date. The problem is that in the query I can't find the syntax. Anybody can help me, please? Thanks in advance. Mika_gengen. I will be back!
13 answers
-
try with DiffDate("a";date();hire date) in a form. With date() which is today's date and hire date which is the value of the field you retrieve from your form. It should work normally
-
-
-
@MCLA dumb question: Are your fields actually of type Date/Time????
--
Why make life hard by making it simple, when it's so easy to make it complicated? -
@LatelyGeekHello
Yes my fields are of type Date/Time
My system is in French (Canada)
I tried by setting my system to English
and replacing the aaaa with yyyy and that works
but I can't leave my system in English because
of all my other Word documents (auto date)
Thank you -
@MariecWell, even though I don’t see the connection with your date format, you can try this:
Ent((Date()-[Date adhésion])/365) for tenure
Format([Date adhésion];"yyyy") for the year of joining
--
Why make life harder than it needs to be when it’s so simple to make it complicated?
-