Jump to content

Split Time and get the Summary


This topic is 6186 days old. Please don't post here. Open a new topic instead.

Recommended Posts

This is a five months developed function.

If someone can test it more I will be gratefull.

Notice: Employment time is slightly different from regural time. If we say that a teacher worked from 17 to 20 we mean that the employment time is four days: 17,18,19,20.

Employ Function

Let ([

FBS=Case( Month(Date(2 ; 29 ; Year(dateStart) ) ) = 3 ; 28 ; 29 );

FBE=Case( Month(Date(2 ; 29 ; Year(dateEnd) ) ) = 3 ; 28 ; 29 );

LDS=Case(

Month(dateStart)=1; 31;

Month(dateStart)=2; FBS;

Month(dateStart)=3; 31;

Month(dateStart)=4; 30;

Month(dateStart)=5; 31;

Month(dateStart)=6; 30;

Month(dateStart)=7; 31;

Month(dateStart)=8; 31;

Month(dateStart)=9; 30;

Month(dateStart)=10; 31;

Month(dateStart)=11; 30;

Month(dateStart)=12; 31);

LDE=Case(

Month(dateEnd)=1; 31;

Month(dateEnd)=2; FBE;

Month(dateEnd)=3; 31;

Month(dateEnd)=4; 30;

Month(dateEnd)=5; 31;

Month(dateEnd)=6; 30;

Month(dateEnd)=7; 31;

Month(dateEnd)=8; 31;

Month(dateEnd)=9; 30;

Month(dateEnd)=10; 31;

Month(dateEnd)=11; 30;

Month(dateEnd)=12; 31);

Zero_Factor=Day(dateStart)=1 and Day(dateEnd)=LDE;

d=Case( Zero_Factor; 0;

Day(dateStart)- Day(dateEnd) > 0; Day(dateEnd)+LDS-Day(dateStart)+1;

Day(dateStart)- Day(dateEnd)< 0 ; Day(dateEnd)-Day(dateStart)+1; 1

);

m0=Case(

Month(dateStart)-Month(dateEnd)>0 and Day(dateStart)-Day(dateEnd)>0;

Month(dateEnd)+11-Month(dateStart);

Month(dateStart)-Month(dateEnd)>0 and Day(dateStart)-Day(dateEnd) ≤ 0;

Month(dateEnd)+12-Month(dateStart);

Month(dateStart)-Month(dateEnd)<0 and Day(dateStart)-Day(dateEnd)>0;

Month(dateEnd)-Month(dateStart)-1;

Month(dateStart)-Month(dateEnd)<0 and Day(dateStart)-Day(dateEnd) ≤ 0;

Month(dateEnd)-Month(dateStart);

Month(dateStart)-Month(dateEnd) = 0 and Day(dateStart)-Day(dateEnd)>0;

11;

Month(dateStart)-Month(dateEnd)=0 and Day(dateStart)-Day(dateEnd) ≤ 0;

Month(dateEnd)-Month(dateStart));

m=Case(

m0=11 and Zero_Factor; 0;

Zero_Factor; m0+1;

m0);

y0=Year(dateEnd)-Year(dateStart);

y=Case(Zero_Factor and m0=11; y0;

Month(dateStart)-Month(dateEnd) ≤ 0; y0; y0-1)

]; y &"Years," & m & " Months," & " " & d & " Days "

)

1. I want to split Years, Monhts and Days.

2. Get the Summary of the splitted values individually.

Then it is easy to get the total time n years, months and days again.

Example

split_years_months_days.zip

Edited by Guest
Link to comment
Share on other sites

Then it is easy to get the total time n years, months and days again

No it still meaningless!!!!!! Some-one may once have fooled a civil servant in the dark dungeons below the central administration of Greece that false belives is the cement it takes the organization last forever, just like the military regime have pursuaded themselfs in Bangladesh that only with them in charge instead of a democratic elected, can the country be govened free of corruption!

Just because an idiosyncracy is institutionalized, doesn't it mean that it's more true.

A person so unlucky to be employed in february in a leap year, can't help being employed a day more before being honored for 40 years of service, while the chap being employed february the year after expiriences one less leapday before reaching 40 years of employment ...you may object that what does a day more or less mean here ...well if it's the day the first person get's hit by a steam roller - then is his widdow not entitled to higher life ensurance sum - due to the shorter registered employment.

--sd

Link to comment
Share on other sites

is it possible to split years,months and days

NO - Does the cutting of apple or oranges in quarters make a difference. Perhaps for the consumtion of the fruit, but certainly not for anything you can quantize ...quaters is quarters so what???

Banglades is far away from European culture, you know it...

Is it, whenever a election or revolution occures, will the patterns of corruption change to adjust to the new power structure, this is the stuff the conquerors always prides themself with ...but it's always borrowed feathers!

I feel this Bakunin quote says it:

it is the peculiarity of privilege and of every privileged position to kill the intellect and heart of man. The privileged man, whether he be privileged politically or economically, is a man depraved in intellect and heart

--sd

Link to comment
Share on other sites

I have to remind you that you did it first. Slit years, months and days.

Just read this thread I have your attached file.

http://fmforums.com/forum/showtopic.php?tid/183978/post/238851/hl//

Link to comment
Share on other sites

But I have never hessitated to let you how daft I think the whole matter is ...if you read all my replies, are they soaked with scepticism. It's beyond me that you continues this ...the endevour doesn't justify itself just because it's you who have gone lost in a Kafkan maze!!!

I begin to worry, for the wellbeing the of Greek Autorities, since they've managed to hire such spineless individuals - I hope for Greece that you're an exception.

--sd

Link to comment
Share on other sites

I have to remind you that you did it first. Slit years, months and days.

Just read this thread I have your attached file.

http://fmforums.com/forum/showtopic.php?tid/183978/post/238851/hl//

Then I guess I will have to remind you of these posts which you continue to just ignore.

Warning 1

Warning 2

Why does this feel like being stuck in the movie Groundhog Day ?

Link to comment
Share on other sites

Why does this feel like being stuck in the movie Groundhog Day ?

I got you babe...I got you babe...

Yeah, it's the kind of movie you only need to see once.

Link to comment
Share on other sites

Unfortunately, Mike, we keep *seeing* it over and over because someone here refuses to HEAR us. That in itself is okay; after all, some people still believe the earth is flat and it is every person's right to ignore common sense if they so choose. But to blame Soren because he didn't disagree strongly enough; indeed, to say that it's now HIS fault that the subject is continuing because he didn't disagree strongly enough, is simply asinine.

Soren, I hand it to you on this one ... your patience is greater than mine would have been. :clap:

LaRetta

Link to comment
Share on other sites

I believe that the earth is not flat too. But this has nothing to do with simple mathematic knowledge. Here we can have a number of mathematical processes that can lead to a logical result. Perhaps the whole function would be 70 pages but I believe that can be done, I am near of that. However I will not post it here again, because you consider as more important how we can change the color of the Fm Layout as we can see from the forum.

Pascal

Link to comment
Share on other sites

Here we can have a number of mathematical processes that can lead to a logical result.

Wrong!

mathematicians may use the conjecture on a provisional basis, but any resulting work is itself conjectural until the underlying conjecture is cleared up

...snipped from: http://en.wikipedia.org/wiki/Conjecture

--sd

Link to comment
Share on other sites

Edudna, I don't see any reason for a personal attack.

Yes my recent post was a CF to change the color BG that i had not seen done before so i shared it as it has many benefits over the container method. Based on your conjecture a new user may think this is the only subject matter that i have ever attempted to tackle. But by simply clicking on my profile and looking at the posts and topics found there your statement would quickly look poorly researched.

Time and again people have told you the Year, Day, Month calc can not be done accurately. As it can not be done with accurate results it can not be done.

Take the following results from your calculation:

DD/MM/YYYY

28/02/2003 - 2/2/2007 = 4 Years 11 Month 3 Days

28/02/2003 - 1/3/2007 = 4 Years 0 Month 2 Days

The first time i had to face this i was not happy either. But it is something that just has to be excepted.

A year is not a set length

A month is not a set length

My post was an innocent bit of fun with LaRetta and not aimed at you.

To do this accurately you will have to choose a different approach. Years, Months, Days will not work.

Link to comment
Share on other sites

I do not understand why we have arguments to a liberal forum. Everyone feel depressed from a topic simply do not reply. I speak for FM development I think not for MacDonalds products.

Thank you for your answer. I have fixed already this issue mentioned above. Years must have a little work more.

Pascal

Employ.zip

Link to comment
Share on other sites

I don't understand why people feel the need to instigate such things.

Quoting you: However I will not post it here again, because you consider as more important how we can change the color of the Fm Layout as we can see from the forum. (nothing to do with this topic)

It seems that you will only listen to people who agree with you.

Your Year,Month,Day calculation will always have bugs, but that doesn't seem to matter to you.

Link to comment
Share on other sites

Neither of those sentences make a lick of sense to me.

Edited ... added a BUNCH more ...

If you know a better way, JUST DO IT! If you don't ... and you obviously don't, then don't criticize those who tell you it can't be done - you insult them; calling them hamburger flippers and layout specialists; with your little digs (if one reads back through your posts, it is pattern of insults)!

Instead, you continue to post the same issue, week after week, month after month implying you are smarter than everyone here because you think it can be done and they must be stupid because they can't do it. The simple truth is ... it can't be done - if it could, they would have done it. If it could be done, THEN YOU WOULD HAVE DONE IT.

You can't. You never could. It is getting quite old. Insult all you wish. And you may occassionally find a sucker to step in and attempt to answer the question. But don't play the innocent victim here that everyone is picking on you because we ALL see through that one.

LaRetta

Edited by Guest
Link to comment
Share on other sites

This topic is 6186 days old. Please don't post here. Open a new topic instead.

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.