Quantcast
Channel: Data Preparation & Blending discussions
Viewing all articles
Browse latest Browse all 4999

In-DB Age vs Formula Tool Age

$
0
0

Looking for some help in this, I've been going crazy on it.  The way we are doing it with the regular formula tool is this: 

 

DateTimeDiff([HIRE_PROCESS_TS],[BIRTH_DT],'year') 

 

This gives the age and seems to be correct.  So when I moved to in-db, I tried to just use a DateDiff and use it the same way the DateTimeDiff works, but it wasn't working so I have ended up with the following formula in my in-db formula: 

 

floor(datediff(day, [BIRTH_DT], [HIRE_PROCESS_TS])/365.23076923074)

 

This one is not correct and has haunted me for a while.  I can't figure out what I am doing wrong.  Any help on this would be greatly appreciated.  I'm using a SQL database.  

 

HIRE_PROCESS_TSBIRTH_DTAge_FormulaToolAge_In-DB_FormulaTool
2005-07-01 10:17:221958-07-024746
2010-01-13 09:14:551967-01-144342
2010-02-19 09:42:311968-02-204241

 


Viewing all articles
Browse latest Browse all 4999

Trending Articles