Link to home
Start Free TrialLog in
Avatar of bolox
bolox

asked on

Conversion of data

I have a program, that for data requirements has converted the AGE field into a 10 digit number?? I am sure it is just converted via HEX/Binary etc or something, can you help.

AGE = 1496593712

For your reference it is the conversion used for Dicom images.

Thanx
Avatar of cookre
cookre
Flag of United States of America image

One common way of saveing elapsed time is to convert it to seconds. That value interpreted as seconds yields about 47 1/2 years
what are the data requirements that REQUIRE you to convert AGE into a 10 digit number?

What is AGE telling you?

AW
Avatar of KurtVon
KurtVon

DICOM uses an AS field for ages, that is an Age String.  It consists of exactly four characters which are the three digit numeric representation of the age followed by a character representing the "units":

010Y = 10 years
305D = 305 days
004W = 4 weeks
007M = 7 months

It just so happens this "number" is 4 bytes of data: 59343530 in hex.  That corresponds to the four characters Y450 which is a date string backwards

054Y = 45 years old.

Hope this helps.

Oops, that's 54 years old.
Avatar of bolox

ASKER

KurtVon, How did you get to the result 59343530???? Fair enough i can convert this binary number to Y450, but where did the 59343530 come from??

B
ASKER CERTIFIED SOLUTION
Avatar of KurtVon
KurtVon

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial