General information
Category:
Coding, syntax & commands
Why not just year(date())-year(birthday) ?
*--------youir message below
Hello, Ed.
Before posting that message, I have checked it.
Your method:
x=int((date()-birthdate)/365.25)
Here you have an example: my birthdate is 1968.12.23
a) int(({2000.12.23}-{1968.12.23})/365.25) gives 32. That's ok, but
b) int(({2001.12.23}-{1968.12.23})/365.25) gives 32. Corect answer is 33.
My method:
a) int((val(dtos({23.12.2000}))-val(dtos({23.12.1968})))/10000) gives 32 and
b) int((val(dtos({23.12.2001}))-val(dtos({23.12.1968})))/10000) gives 33
All the best,
Grig
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only