The input should come from the date field and the output should include the year and the months in decimal. for example: Input 03/05/2016 the output: 6,5.
.
value: if( a!isNullOrEmpty(ri!dealerBusiness.dateOrganized), null, /*calculate the age of the person*/ int(right(today(), 4)) - ( right(ri!dealerBusiness.dateOrganized, 4) ) ),
This what I have so far.
Discussion posts and replies are publicly visible
I don't understand what you mean "in decimal"? Could you give a little more detail as to what exaclty your data inputs are, what the corresponding output should be, and why?
If you just want a read-out of the elapsed years, elapsed months: check out the "elapsedmonths" function in the Date and Time Utilities plug-in.
Hi Mike,
I have to calculate a company years in business and the requirements are " The field should calculate based on year formed and may be decimal Ex: 31.2
so if the business is being open for 1 year and 6 months I should get 01,06
gotcha. please use the aforementioned plug-in; you should be able to make use of elapsedYears() and elapsedMonths() to satisfy this requirement, i expect.
FrankT said:so if the business is being open for 1 year and 6 months I should get 01,06
Additionally, are you sure you don't want "1.5" for 1 year and 6 months if you are converting to decimal? Otherwise for one year and 11 months, you will get "1.11"?