Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey There,
i use on my data model at the age function & Interval for some reason i get not the right age, any idea what im doing wrong ?
On sql servel i use this "DATEDIFF(Year,E.BirthDate,GetDate()) EmployeeAge" but i know datediff does not work on qv so i try this other method.
Regards
David
Interval() is a formatting function, like Date() or Timestamp().
Age() calculates age.
Isn't the right age 39?
Look at the Interval
I agree the age will be 40 on May 15th, isn't it?
The interval is showing a rounded number, right? So basically a rough estimation how many years have passed between dates. But that's not "age" as I would define it (which is more like a floor'ed number).
I got 39, when I put this in a text box object
=Interval((Today() - MakeDate(1976, 5, 15))/365, 'D')
Maybe you can explain what you want to calculate? The age of a person? Then use the age() function.
I try To understand the diff between Interval Vs Age()
Interval() is a formatting function, like Date() or Timestamp().
Age() calculates age.
Do you happen to know the accuracy of the Age() function?
Apologies for asking this in this post, please let me know if I should start a new post.
I always used to calculate age by dividing the days number by 365.25 as 365 was not accurate enough. Then, someone pointed out to me that Pope Gregory XIII had pointed out that Julius Caesar was incorrect in suggesting a year was 365.25 days long, it should be 365.2425. Hence the change from the Julian Calendar to the Gregorian Calendar.
So, do you happen to know how accurate Qlikview's Age() function is, the help screen does not specify?