PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Returns the age according to the date of birth.
Versions 16 and later
Universal Windows 10 App This function is now available for the Windows Phone applications.
New in version 16
Universal Windows 10 App This function is now available for the Windows Phone applications.
Universal Windows 10 App This function is now available for the Windows Phone applications.
Versions 17 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Versions 18 and later
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
Age("19690513", "20051010")  
// Returns "00360427" which means 36 years, 4 months and 27 days

Age("19730912", "20050812")  
// Returns "00311100" which means 31 years and 11 months
// How old are you?
dMyAge is Date
dMyAge = Age("19790201", "20061025")
InfoBuild("Your age is: %1 years %2 months %3 days", ...
dMyAge..Year, dMyAge..Month, dMyAge..Day)
// Displays: "Your age is: 27 years 08 months 24 days"
Syntax
<Result> = Age(<Date Of Birth> [, <Calculation Date>])
<Result>: Character string
  • Age in years, months and days in YYYYMMDD format. It represents the number of years, months and days between the date of birth and the calculation date.
  • Empty string ("") if an error occurred (date of birth after the calculation date or invalid date).
<Date Of Birth>: Character string or Date variable
Date of birth in YYYYMMDD format.
<Calculation Date>: Optional character string or Date variable
Date in YYYYMMDD format according to which the age will be calculated.
If this date is not specified, the calculation will be performed according to today's date.
Related Examples:
Calculating the date of Easter and an age Unit examples (WINDEV): Calculating the date of Easter and an age
[ + ] Calculating the date of Easter for a given year and calculating the age of a person at a given date.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230std.dll
Windows Mobile wp230std.dll
Java wd230java.jar
Linux wd230std.so
Android wd230android.jar
Minimum required version
  • Version 10
This page is also available for…
Comments
DIFERENCA ENTRE DATAS
DIFERENCA_dATAS is Date=Age(EDT_data_inicial,EDT_data_Final)

EDT_DIA=DIFERENCA_dATAS..Day
EDT_MES=DIFERENCA_dATAS..Month
EDT_ANO=DIFERENCA_dATAS..Year

// BLOG COM VIDEO E EXEMPLOS

https://www.youtube.com/watch?v=KZfAotbawss

http://windevdesenvolvimento.blogspot.com.br/2017/09/aula-1266-datas-018-diferenca.html




De matos
Sep. 30 2017
Exemplo Calcular Idade
Exemplo Calcular Idade

d_data_nascimento is Date=EDT_data
d_data_hoje is Date=DateSys()
d_minha_idade is Date=""
d_minha_idade=Age(d_data_nascimento,d_data_hoje)
EDT_resultado=d_minha_idade..Year+" Anos "+d_minha_idade..Month+" Meses "+d_minha_idade..Day+" Dias"

//Blog com video e exemplo
http://windevdesenvolvimento.blogspot.com.br/2016/07/curso-windev-datas-008-age-mostra-idade.html
https://www.youtube.com/watch?v=92HZ0hql0m0



De matos AMARILDO
Jul. 22 2016