Hi,
I have problem to calculate the time between 2 dates. The issue is that both dates are split between date and time and both are in number format.
So e.g. I have the following:
Create 2 report variables of a date type where you will convert DateA and TimeA numbers to a real Date A, as well as DateB and TimeB numbers to a real Date B.
Then use those 2 variable and a formula suggested here to get a difference between the dates: Diff between two dates
Brief hint:
Convert your date to number of seconds since 1970 for example, convert your time in a similar way, add these two for date 1. Repeat the same for date 2.
Finally subtract those 2 numbers (for dfate 1 and date 2), then parse out the days, hours, minutes.
1 day = 24 * 3600 secoonds fore example
Also, please try a search on BB, this has been discussed and resolved before ; )
Also shoot whatever idiot decided to store these values this way. That has to be the stupidest method for storing dates and times I think I’ve ever come across. I think that in order to do anything with those values, you will either have to convert them to strings, parse out the parts, and recombine them into a valid date format, OR do crazy math with FLOOR to separate out the values then re-multiply them by the appropriate values (e.g., 60 for minutes, 3600 for hours) to generate a useful number (e.g., seconds since midnight).
Storing things as numbers that aren’t actually numbers makes baby Jesus cry.
Manipulating / calcuating as numbers, in the ETL code, using Julian etc can be useful, but as Lugh suggests storing them and presenting them to the user to report on, in this format, is just plain wrong
Age as a measure makes sense if you wanna see age distribution across your work force, maybe using percentiles etc.
Better would be length of employment to avoid direct age discrimination.
Otherwise, I agree age is a property of a person, just like hair color, height; or price as an attribute for an item/SKU, etc.