>Cetin,
>
>>Jim,
>>Main problem I think in your routine you're using highly randomized values for days that doesn't fit well saying time difference in YMD.
>>ie: dod is {^2002/07/21}, died 1 year, 8 months, 328 days ago. dobs then {^1999/12/27}
>>It's also same as saying died 2 years, 6 months, 24 days ago.
>
>My data comes from an effective 'day' counter, not unlike an operating system uptime value. My problem is finding that last reboot ;-)
>
>>ndys = min(INT(31 * RAND() + 1), day(ddod))
>>
>>should almost get the differences to 0 (still might be as difference saying could be like:
>>2 years 2 months 31 days vs 2 years 3 months 0 days).
>>PS: Check my first reply. It was updated for a slight adjustment in CalcBdate.
>>Cetin
>
>Got the change, thanks. Now we are at about 850 good results in the 1000 samples, with the remaining differences maxing at around 3 days. I
think I can live with this. Thanks much!
You're welcome and happy new year. Your problem leaded me to notice flaws in my routines:) I'll correct them in the future I think.
Cetin