Hi,
I trying to calculate diference between 2 dates (dt born and dt die).
I need months and days.
Can someone help me?
tks
Marcelo
Calc between dates
Moderators: chulett, rschirm, roy
To expand on this just a little, use Iconv to convert a date into 'internal' format. Once you have two dates in internal format, simple subtraction would give you the diffence between them in days... then you take it from there.
Of course, this depends on what you mean by 'months'. If a month is a generic block of 30 days (for instance) this will be very simple to derive. Do you need the actual months between the two dates? I'd guess in that case you'd need to create some sort of iterative approach that works its way from one date to the other, counting as it goes.
Of course, this depends on what you mean by 'months'. If a month is a generic block of 30 days (for instance) this will be very simple to derive. Do you need the actual months between the two dates? I'd guess in that case you'd need to create some sort of iterative approach that works its way from one date to the other, counting as it goes.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers