Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Différence entre deux dates

Bonjour,

Je n'arrive pas à calculer la différence entre deux dates: la première est saisie manuellement 31/12/2014, la deuxième est un champ de la base variable qui est la date d'embauche. la formule age(31/12/2014, date_embauche) n'affiche pas le bon résultat.

Pourriez vous m'aider SVP?

Merci d'avance.

1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

You can use

   Age('2014-12-31',date_embauche)

or

   Age(Date#('31/12/2014','DD/MM/YYYY'),date_embauche)

or

   Age(MakeDate(2014,12,31),date_embauche)

Just make sure that "date_embauche" is correctly interpreted also. See Why don’t my dates work?

HIC

View solution in original post

3 Replies
sebchrmt
Explorer
Explorer

Bonjour,

Quel est le format du champ date_embauche ?

hic
Former Employee
Former Employee

You can use

   Age('2014-12-31',date_embauche)

or

   Age(Date#('31/12/2014','DD/MM/YYYY'),date_embauche)

or

   Age(MakeDate(2014,12,31),date_embauche)

Just make sure that "date_embauche" is correctly interpreted also. See Why don’t my dates work?

HIC

Not applicable
Author

it works perfectly,

Thank you.