Calcul de date

More
1 month 1 week ago #229813 by nathysy
Calcul de date was created by nathysy
Bonjour
J'aimerai remplir automatiquement le champ age à la suite de la saisie au préalable du champ date de naissance
J'utilise limesurvey  Version 3.22.15+200505
Merci pour votre aide

Cordialement

Please Log in to join the conversation.

More
1 month 1 week ago #229818 by Joffm
Replied by Joffm on topic Calcul de date
Calculer un horodatage des deux dates.
Aujourd'hui : {strtotime('now')}
date de naissance : {strtotime(D1)}
D1 = Question code de date.

Calculez la différence et formatez-la en années au lieu de secondes.
{floor((strtotime('now')-strtotime(D1))/(60*60*24*365.25))}
  




Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless
Attachments:

Please Log in to join the conversation.

More
1 month 1 week ago #229823 by nathysy
Replied by nathysy on topic Calcul de date
Merci pour votre réponse
Où dois je placer ce code?

Please Log in to join the conversation.

More
1 month 1 week ago #229824 by nathysy
Replied by nathysy on topic Calcul de date
Pour information, le champ Age a pour type Equation
et j'ai mis le code dans la zone Options générales/Equation du filtre conditionnel
Mais ca ne marche pas

Please Log in to join the conversation.

More
1 month 1 week ago #229825 by Joffm
Replied by Joffm on topic Calcul de date
Non, dans le texte de la question

 


Volunteers are not paid.
Not because they are worthless, but because they are priceless
Attachments:

Please Log in to join the conversation.

More
1 month 1 week ago #229826 by nathysy
Replied by nathysy on topic Calcul de date
Merci beaucoup pour votre aide
Ca marche

Please Log in to join the conversation.

Moderators: Nickko

Start now!

Just create your account and start using Limesurvey today.

Register now