How to count age in days and decibles

Hi All,

I’m new to X++, one of my client is into hatcheries and they want facility to see age of chick in days format as well in decimals.(septa -decimal system) E.g. Day old chick should be shown as 0.1, twodays old chick is 0.2, like 0.3, 0.4 and so on 7 day old chick will be shown as 1.0. 8 day old chick is 1.1, 1.2…1.6, 2.0 and so on. Age counting of parent chicks starts from the day the batch of parent chicks is placed in brooding. (The day the batch number is generated).Day one is 0.1.This facility is needed throughout the system and needs to a basis for tracking the age of chicks. For doing this I renamed Dimension Size to Age, so that I can track age throughout the system.

How shall I write the code to get age and where shall i write it?

Kindly do some needful for the same ASAP.

Taka a look at Class “Global”; there are some methods for date-calculations.