Question:
how can i do this ? ?
Answer:
Divide it by 365 to give years. Divide the remainder by 12 to give months.
Or you could try adding 9981 to an initial type D field, but that might give strange results depending on whether you're a catholic or a protestant.
_________________
First he pinches my sig, Now he's cribbing my posts too!
Answer:
my problem is if months = 13.12 i need to add 1 year to year counter
and decrease from month counter
Answer:
forget the second post.
i have 9981 days i div. by 365 and i get 27 . the remain result is 126
9981 - (27 * 365) = 126.
now, when i try to compute months you say i have to div. 126 by 12.
it's wrong ! i need to div. by ( 31 or 30 or 29 or 28 days in month)
how can i know by which of the number should i div. ? ?
Answer:
Have you looked at the MOD command?
_________________
Kind Regards
Rosie Brent
Please remember to search the forum and check the FAQ before posting questions, thank you.
Tuly Idiot most of the time, part-time Guru
Answer:
Rosie, you left a [no I didn't ] in the previous post
_________________
The Doc
Magna Grand Docot of the Tuly Idiot Order
2007 Basic Rules
Answer:
And don't forget leap years.
If you have got 27 years, how many of them are leap years?
6? Or rather 7?
Answer:
forget the second post.
There's just no pleasing some people.
i have 9981 days i div. by 365 and i get 27 . the remain result is 126
9981 - (27 * 365) = 126.
now, when i try to compute months you say i have to div. 126 by 12.
it's wrong ! i need to div. by ( 31 or 30 or 29 or 28 days in month)
how can i know by which of the number should i div. ? ?
Seems you've answered your own question. I must have been thinking in metric or something.
Fact is, you can't decide exactly, as months have variable numbers of days. So the number of months will depend on when this magic number of days start. Maybe if you'd told us what you're trying to do - end result - we could help. Or ask whoever requested it what kind of approximation they'll accept.
A bonus point to anybody who knows why the mention of catholics & protestants isn't entirely sarcastic here.
_________________
First he pinches my sig, Now he's cribbing my posts too!
Answer:
A bonus point to anybody who knows why the mention of catholics & protestants isn't entirely sarcastic here.
Something to do with changing of calendars? (Julian/Gregorian?)
Possibly?
Go on, tell us!
_________________
Kind Regards
Rosie Brent
Please remember to search the forum and check the FAQ before posting questions, thank you.
Tuly Idiot most of the time, part-time Guru
Answer:
Something to do with changing of calendars? (Julian/Gregorian?)
Spot on! Catholic countries generally changed over much earlier than Protestant countries. On a unix system do cal 9 1752 (unix follows the US pattern, and the US still belonged to England then!).
If you toy around with type D fields, you'll notice that SAP has the missing days sometime in the late 1500s.
_________________
First he pinches my sig, Now he's cribbing my posts too!
Answer:
Hah! So when it's off topic but of interest...
m@t
_________________
TULY The quality of answers is roughly proportional to the quality of the question.
The downside of being better than everyone else is that people tend to assume you're pretentious.
Answer:
Hah! So when it's off topic but of interest...
m@t
That is what I call, 'double standard'!!!
Answer:
Alright - I admit it, off topic, all my fault - topic locked
Happy now ?
_________________
Kind Regards
Rosie Brent
Please remember to search the forum and check the FAQ before posting questions, thank you.
Tuly Idiot most of the time, part-time Guru