FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WINDEV 2024
→
age calculation
age calculation
Débuté par guillermo, 12 oct. 2005 23:36 - 7 réponses
Connectez-vous…
guillermo
#1
Posté le 12 octobre 2005 - 23:36
Hi forum:
Exist a function for age calculation ?
Thanks
Guillermo
Signaler
0
0
Piet van Zanten
#2
Posté le 13 octobre 2005 - 00:01
Hi Guillermo,
Saw it announced in WD10, so not yet I guess.
Regards,
Piet
Signaler
0
0
guillermo
#3
Posté le 13 octobre 2005 - 02:32
Hi Piet:
I remember to have read something in this respect, but I forgot where, I have been looking for it hours ago, without success.
Guillermo
Hi Guillermo,
Saw it announced in WD10, so not yet I guess.
Regards,
Piet
Signaler
0
0
guillermo
#4
Posté le 13 octobre 2005 - 04:56
The code gave it to me a friend (the great Ernesto Del Punta ), an old calculation that comes from QBasic or maybe Clipper.
Age = ((Year_Today - Year_of_Birth) * 12 + Month_Today - Month_of_Bird )/12
IF Month_of_Bird = Month_of_Bird AND Day_Of_Birth > Day_Today THEN
Age -= 1
END
Guillermo
Hi Piet:
I remember to have read something in this respect, but I forgot where, I have been looking for it hours ago, without success.
Guillermo
Hi Guillermo,
Saw it announced in WD10, so not yet I guess.
Regards,
Piet
Signaler
0
0
Al
#5
Posté le 13 octobre 2005 - 08:35
G'day Guillermo
There is a typo in your example. >IF Month_of_Bird = Month_of_Bird
Age = ((Year_Today - Year_of_Birth) * 12 + Month_Today - Month_of_Bird )/12
IF Month_of_Bird = Month_of_Bird AND Day_Of_Birth > Day_Today THEN
Age -= 1
END
Regards
Al
Signaler
0
0
guillermo
#6
Posté le 13 octobre 2005 - 16:34
G'day Al
Corrected.
Thanks
Guillermo
G'day Guillermo
There is a typo in your example. >IF Month_of_Bird = Month_of_Bird
Age = ((Year_Today - Year_of_Birth) * 12 + Month_Today - Month_of_Bird )/12
IF Month_of_Bird = Month_of_Bird AND Day_Of_Birth > Day_Today THEN
Age -= 1
END
Regards
Al
Signaler
0
0
guillermo
#7
Posté le 13 octobre 2005 - 16:53
I would be thinking of some object "flyer", since instead of BIRTH I put BIRD
Guillermo
G'day Al
Corrected.
Thanks
Guillermo
G'day Guillermo
There is a typo in your example. >IF Month_of_Bird = Month_of_Bird
Age = ((Year_Today - Year_of_Birth) * 12 + Month_Today - Month_of_Bird )/12
IF Month_of_Bird = Month_of_Bird AND Day_Of_Birth > Day_Today THEN
Age -= 1
END
Regards
Al
Signaler
0
0
Xavier Schauwvlieghe
#8
Posté le 14 octobre 2005 - 01:28
Hi forum:
Exist a function for age calculation ?
Thanks
Guillermo
Hi Guillermo,
Age calculation:
FUNCTION Age(pdBirthDate is Date)
ldToday is Date = DateSys()
RESULT ldToday..Year - pdBirthDate..Year - (ldToday..Month < pdBirthDate..Month ? 1 ELSE 0)
Greetings,
Xavier
Founder of the WinDev Developers Group Belgium & The Netherlands
WinDev Developers Group Belgium-Netherlands
Signaler
0
0
→ Revenir à WINDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (précédentes versions)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Type de recherche
Uniquement les sujets
Tous les messages
Période de recherche
Date indifférente
Moins d'une heure
Moins de 24 heures
Moins d'une semaine
Moins d'un mois
Moins d'un an
Annuler
Aperçu de votre message
Ajouter une image
Importer une image depuis une URL
Envoyer une image depuis un fichier de votre disque
Déposez ici un fichier ou cliquez sur "Parcourir..."
ou
Annuler
0%
WLangage
SQL
XML, HTML
JAVA, Javascript
Texte