Calculation of time after midnight
Hi all
I'm working on a worksheet of employee time. There are 4 time fields (amIN, amOUT, pmIN, pmOUT) to allow a lunch break. I have a script that calculates for the normal office hours. BUT, if the shift goes beyond midnight, then it does not calculate correctly.
Here's what I have in FormCalc in an event to calculate:
fullTime var = 0
var = 0 recreation
If (pmIN don't pmOUT null and not null) then
If (Time2Num (amIN.formattedValue, "HH: mm") < Time2Num (pmOUT.formattedValue, "HH: mm")) then
full time = Abs (Time2Num (amIN.formattedValue, "HH: mm")-Time2Num (pmOUT.formattedValue, "HH: mm")) / (60 * 60 * 1000)
on the other
full time = 24 - Abs (Time2Num (pmOUT.formattedValue, "HH: mm")-Time2Num (amIN.formattedValue, "HH: mm")) / (60 * 60 * 1000)
endif
recess = Abs (Time2Num (pmIN.formattedValue, "HH: mm")-Time2Num (amOUT.formattedValue, "HH: mm")) / (60 * 60 * 1000)
$ = fullTime - recreation
on the other
full time = Abs (Time2Num (amIN.formattedValue, "HH: mm")-Time2Num (amOUT.formattedValue, "HH: mm")) / (60 * 60 * 1000)
$ = full time
If (amIN == null) then $= null else $= (full time - recess)
endif
endif
Someone help me please?
Thank you
Gene-O
Ok
I changed the script so it will check if amIN's largest amOUT.
fullTime var = 0
var = 0 recreation
If (amIN don't pmOUT null and not null) then
If (Time2Num (amIN.formattedValue, "HH: mm") lt Time2Num (pmOUT.formattedValue, "HH: mm")) then
full time = Abs (Time2Num (amIN.formattedValue, "HH: mm")-Time2Num (pmOUT.formattedValue, "HH: mm")) / (60 * 60 * 1000)
on the other
full time = 24 - Abs (Time2Num (pmOUT.formattedValue, "HH: mm")-Time2Num (amIN.formattedValue, "HH: mm")) / (60 * 60 * 1000)
endif
If (amOUT not null and not null pmIN) then
If (Time2Num (amOUT.formattedValue, "HH: mm") lt Time2Num (pmIN.formattedValue, "HH: mm")) then
recess = Abs (Time2Num (pmIN.formattedValue, "HH: mm")-Time2Num (amOUT.formattedValue, "HH: mm")) / (60 * 60 * 1000)
on the other
recess = 24 - Abs (Time2Num (pmIN.formattedValue, "HH: mm")-Time2Num (amOUT.formattedValue, "HH: mm")) / (60 * 60 * 1000)
endif
endif
$ = fullTime - recreation
else if (null not amIN and amOUT pmIN eq eq pmOUT null null and not null) then
If (Time2Num (amIN.formattedValue, "HH: mm") lt Time2Num (amOUT.formattedValue, "HH: mm")) then
$ = Abs (Time2Num (amOUT.formattedValue, "HH: mm")-Time2Num (amIN.formattedValue, "HH: mm")) / (60 * 60 * 1000)
on the other
$ = 24 abs (Time2Num (amOUT.formattedValue, "HH: mm")-Time2Num (amIN.formattedValue, "HH: mm")) / (60 * 60 * 1000)
endif
on the other
$ = full time
endif
Tags: Adobe LiveCycle
Similar Questions
-
How to extend the day after midnight to complete activities and close the rings
If you wish to extend your day past midnight to close the activity temporarily put rings the time zone to time zone more West. Change the time zone by midnight. Now, you can use the overtime that the timezone is offset from your usual time zone to complement the missing activities.
I tested again on a long distance flight, where the time zone to destination is shifted 8 hours than my home timezone.
As you can see, watch OS 2.1 may give credit for activities for more than 24 hours if change you the time zone.
At 17:00, the watch already showed that 25 hours of 'Beneficiary', more than a day.
And with the 8hrs offset in my regular zone I could have accumulated 30 stand hours in work a day of:
If you wish to extend your day to complete the activities in this way, do not forget to set the time zone before going to sleep, or you may forget the next day that the watch is a few hours off the coast. I'd wait to set the zone time back until after receiving the message that all tasks have been completed for the day and set the timezone to the correct time after the next hour.
Thank you
What is a body to do if she lives in Hawaii?
-
iPhone 5 screen freezes from time to time after updating to ios 10.
iPhone 5 screen freezes from time to time after updating to ios 10. Then, should I block the screen again and unlock it to make the iphone work again.
Hey Nilay182,
Thank you for using communities Support from Apple. I can see from your post that you are having problems with your iPhone freeze or does not. Having a reliable phone is important and I would help him get yours working normally again. I have provided a link that explains how to troubleshoot a few things with your phone when it does not.
If the screen of your iPhone, iPad or iPod touch does not respond to touch
If you still have problems with your screen after you follow these steps, let know us and we can continue to troubleshoot from there.
Kind regards.
-
Slow to open the first time after startup apps
Slow to open the first time after startup apps
How about, the second time, that is, close and reopen?
Also download and run Etrecheck. Copy and paste the results in your response. Etrecheck is a diagnostic tool that has been developed by one of the most respected users here (and recommended by Apple's Support personnel) of the CSA to provide a snapshot of the system and help identify the most obvious culprits that can adversely affect the performance of a Mac.
-
Firefox crashes while loading images for the first time after windows starts upward
every time I log on windows, Open firefox and load an image or a site with content firefox flash stops responding for 2 or 3 seconds and then returns to normal after that and everything is fine... it happens only when I open firefox for the first time after starting windows to the top...
thing I tried
Start windows and Open firefox in safe mode (does'nt fix the problem)updated 13 solved the problem...!
-
Unable to connect using Face Time after updating iOS 9.3
Unable to connect using Face Time after updating iOS 9.3
gshort319 wrote:
Unable to connect using Face Time after updating iOS 9.3
Use FaceTime with your iPhone, iPad or iPod touch - Apple Support
Get help if you cannot make or receive calls FaceTime - Apple Support
-
Satellite A100-906 each time after power button
Satellite A100-906 each time after pressing the button will stop exactly in 1 minute.
And in Setup mode too.What it means?
Hello
Are you sure that the laptop is connected correctly to the mains?
Is the battery ok?My battery is very old and the laptop runs only 2 min with battery.
So I have to use the laptop still plugged into the mains. -
My pc crashes every time after updateding or play a game like worlds of war crartf and I ran a full scan and no theats ideals?
Check the download site of the manufacture of the graphics card for the latest Windows 7 drivers for your card.
ATI: http://support.amd.com/us/gpudownload/Pages/index.aspx
NVIDIA: http://www.nvidia.com/Download/index5.aspx?lang=en-us
Never be afraid to ask. This forum has some of the best people in the world to help.
-
What is the default time after which a temporary internet file is saved
When we browse the net or write e-mails, temporary internet files are created and stored in the system. I want to know what is the default time after which a new temporary internet file is created for the same browsing session, especially when creating e-mail with attachments.
When we browse the net or write e-mails, temporary internet files are created and stored in the system. I want to know what is the default time after which a new temporary internet file is created for the same browsing session, especially when creating e-mail with attachments.
-
How can I get rid of the screen of "Found New Hardware Wizzard: device modem on high definition audio bus" that kept appearing on my screen each time after I log on my computer? Thank you.
If uninstall you it, it will all come immediately the next time you reboot and start bugging again.
-
Each time after clicking the icon of user account on windows xp to change a password is crashes with this error message: Microsoft (R) HTML Application host has encountered a problem and needs to close.
There is a Microsoft Knowledge base article which sets up a few steps to perform in the computer in order to solve the problem you are experiencing, read the article that you find on the link I am mentioning below and see if it helps the measures mentioned:
-
Several times after that I opened Google it does not connect to the internet. Has worked for a long time, and now it will not. Sometimes it opens if you "Refresh" sometimes not. Help, please. It has been stable over the years and now it will not work. I get no help when I diagnoise of problems, but I never. It has been checked and rechecked. PitStop does not even recognize a problem. I could change the homepage, but I prefer to use Google if it works. Frustrating.
You may need to update your toolbar, google has made some changes just about everything and possibly that the page is not where it used to be.
-
TestPage printed each time after start printer
My Photosmart printer c 3180 prints every time after commissioning a testpage since I have connected the printer to the pc with windows 8.1
I tried this but was not successful. But I found the solution in the official page of the HP mentioned by someone in the forum.
I'm happy again. Thank you! -
Dell audio drivers will not load when the system is turned on for the first time after adoption of Windows 10. I have to reboot every time. So what I'm doing puts the system into sleep. in this way, I don't need to stop and restart the system. It is Dell Inspiron N5559. Audio drivers are installed and up-to-date. Equipment works correctly.
Hi akilesh.sharma18,
Please repost this in the Audio forum from the laptop to help.
-
For the third time, after re-installing Photoshop components 13, I tried to update, but every time I get the U44M1I200 error code that can help me?
U44... Update error http://forums.adobe.com/thread/1289956 can help
Maybe you are looking for
-
Satego P100 - the screen goes black
Hello If I turn on my laptop there is no problem. After maybe 5 minutes, the screen goes black and after a few minutes, he just a blue screen. Restarting the laptop. But now I don't have lines on the screen for the display of the BIOS and the power o
-
Menus to help advise - below but #3 - the only toolbar options are game and help andWhen I opened one of them, nor give the game as an option, please advise, thank you! Click to open the games. Select a game. In the toolbar, click the arrow next to t
-
Pavilion 15-p205nj: bat pilots and buzzing associate
Hello. IV ' e bought my computer 1 month ago and from the beginning I had a problem with video playback - while watching any kind of video I had zoom during video playback. I tried to install the drivers from the HP site and later discovered that the
-
Lost songs on iTunes when updated for IE9
Hi I did a shot of my computer for ie9 own then when when I put on my ipod it does not have all my songs only 30 147 songs and I can't get the rest of them on thanks
-
Pavilion 15-d016sv: startup options
What combination of keys for the menu "boot options" when starting?