Skip to Content
0
Former Member
Feb 15, 2012 at 12:43 PM

Calculate Age

41 Views

I am brand new to this product and I have not yet had any training.

I am trying to calulate a persons age by using this syntax

trunc(to_decimal(to_char(sysdate(),'yyyymmdd'), '.', ',', 0)

-to_decimal(to_char( Query1.DOB,'yyyymmdd'), '.', ',', 0),0)

/1000

It seems to work until I get to /1000. Instead of dividing by 1000, it multiplies by 1000.

Is the symbol for divide different ?

Cheers

Gus

Edited by: guscrighton on Feb 15, 2012 1:43 PM