Hello Fellows,
I am looking for the code for putting in Formula tool of In-DB to calculate the age in years format.
Any help will greatly appreciated. Thanks in advance!!!
Solved! Go to Solution.
Try DATEDIFF ( year, "DOB field" , GETDATE())
I tried using the DATEDIFF method in IN-DB Formula and it doesnt work for me, is there any other method to calculate age in the IN-DB formula tool
In-DB functions are dependent on your database syntax and library of functions.
In SQL Server and MySQL, it's DATEDIFF
In Oracle, you can subtract one date minus the other. E.g. -> 2018-01-18 - 2018-01-03
What's your database?
Cheers,
Its Oracle, so if i want to calculate the age through in-db formula tool , what query should i use?
I was able to do in Sql through Sysdate but getdate in IN-db formula is creating issues
User | Count |
---|---|
17 | |
15 | |
15 | |
8 | |
5 |