Formula for Time going past midnight in Designer

Hi
I am having somewhat of a hard time finding a good formula to use in Livecycle Designer for working out hours that go past midnight.
I have a timesheet which is great for anyone working during daytime hours but if i want to use it for someone who does nightwork it keeps returning a negative value.
I have two datetime fields for start(FldStart) and finish(FldEnd).
Problem occurs when i have 22:30 for start and 02:30 for end.
I already have a calc to convert them to decimal in the Hours worked field so i'm in a bind here???????????
My time format is HH:MM.
HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Hi Geo,
Firstly thankyou for your reply.
I am new to this and i am self taught when it comes to things IT so please excuse me if i get a little confused. When you mention that i have to include the date for start and end time do you mean i have to have the code something like this:
FldHrsWorked.rawValue = ((Time2Num(FldEnd.formattedValue, "date{DD-MM-YY} time{HH:MM}") - Time2Num(FldStart.formattedValue, "date{DD-MM-YY} time{HH:MM}")) / (60 * 60 * 1000)) - FldLessBreaks
I have put that code in to see if it worked but alas, nothing happens in my FldHrsWorked field now.
I was reading in excel that if you put the formula =A2+(A1>A2)-A1 it will Subtract Times That Span Past Midnight Into a New Day but i can't figure how to add that in my original code.
I really don't want to have the guys put in date and time for both fields as, well, put simply the whinging from them will do my head in!!!!!!
Yours or others response would be a great help for me.
PS: I think the Time2Num might be the cause here with the new code that i tried.

Similar Messages

  • Custom Fast formula for Time Entry Rule in OTL

    Hi,
    i have created custom validation for time entry rules. I need to validate where Project and task fields are null or not? If Yes, it has to fire the custom message that i have mentioned in function. Please check the below code and help me whether i am on right path:
    CREATE OR REPLACE FUNCTION NON_pto_against_projects (
    p_time_category_id NUMBER,
    p_person_id NUMBER
    RETURN VARCHAR2
    IS
    --Variables used for retrieving timecard id and ovn
    l_db_pre_period_start DATE;
    l_db_pre_period_stop DATE;
    l_time_building_block_id hxc_time_building_blocks.time_building_block_id%TYPE;
    l_object_version_number hxc_time_building_blocks.object_version_number%TYPE;
    --Variables used for loading timecard tables
    l_time_building_blocks hxc_self_service_time_deposit.timecard_info;
    l_time_app_attributes hxc_self_service_time_deposit.app_attributes_info;
    l_attributes hxc_self_service_time_deposit.building_block_attribute_info;
    --Variables used for getting exploded time details
    v_blocks_tab hxc_block_table_type;
    v_attr_tab hxc_attribute_table_type;
    l_messages_tab hxc_message_table_type;
    l_detail_blocks hxc_self_service_time_deposit.timecard_info;
    l_detail_messages hxc_self_service_time_deposit.message_table;
    CURSOR csr_category_elements (p_category_id NUMBER)
    IS
    SELECT 'ELEMENT - ' || TO_CHAR (value_id) element_type_string
    FROM hxc_time_category_comps_v
    WHERE time_category_id = p_category_id;
    l_cat_elements_string VARCHAR2 (2000);
    l_temp VARCHAR2 (1000); --Trace message
    l_success_flag CHAR (1); --Return values
    BEGIN
    --Initialize variables
    l_success_flag := 'S';
    l_time_building_blocks := hxc_self_service_time_deposit.get_building_blocks;
    l_attributes := hxc_self_service_time_deposit.get_block_attributes;
    v_blocks_tab :=
    hxc_deposit_wrapper_utilities.blocks_to_array (l_time_building_blocks);
    v_attr_tab :=
    hxc_deposit_wrapper_utilities.attributes_to_array (l_attributes);
    IF v_blocks_tab.FIRST IS NOT NULL
    THEN
    Take each ELEMENT type attribute, and search whether PROJECTS type attribute exists for the SAME BLOCK-START
    FOR index1 IN v_attr_tab.FIRST .. v_attr_tab.LAST
    LOOP
    IF v_attr_tab (index1).attribute_category = 'ELEMENT - %'
    THEN --Element attr
    FOR element_rec IN csr_category_elements (p_time_category_id)
    LOOP
    If Element Attribute matches any of the NON-TOP elements in the Time Category-START
    IF v_attr_tab (index1).attribute_category =
    element_rec.element_type_string
    THEN
    Check PROJECTS Attributes project and task belonging to ELEMENT attribute's owner block-START
    l_success_flag := 'E';
    FOR index2 IN v_attr_tab.FIRST .. v_attr_tab.LAST
    LOOP
    IF v_attr_tab (index2).attribute_category LIKE
    'PROJECT - %'
    AND v_attr_tab (index2).building_block_id =
    v_attr_tab (index1).building_block_id
    AND v_attr_tab (index2).attribute1 IS NOT NULL
    AND v_attr_tab (index2).attribute2 IS NOT NULL
    THEN
    l_success_flag := 'S';
    EXIT;
    END IF;
    END LOOP;
    IF l_success_flag = 'E'
    THEN
    RETURN 'E';
    END IF;
    Check PROJECTS Attributes project and task belonging to ELEMENT attribute's owner block-END
    END IF;
    If Element Attribute matches any of the NON-TOP elements in the Time Category-END
    END LOOP;
    END IF; --Element attr
    END LOOP;
    Take each ELEMENT type attribute, and search whether PROJECTS type attribute exists for the SAME BLOCK-END
    END IF;
    RETURN l_success_flag;
    EXCEPTION
    WHEN OTHERS
    THEN
    RAISE;
    END NON_pto_against_projects;

    INPUTS ARE resource_id (number)
    , submission_date (text)these inputs are passed in PLSQL Code and some of them in formula context
    2. While we define a new context for a time entry rule. How is the data that we enter in the time entry rule passed to the fast formula?See the time Rule entry screen and you will find the parameters window there.

  • P2 Spanned Clip Timecode Goes Past Midnight

    I'm in a bit of a pickle here. I have a two hour show shot on four Panasonic 3700s and one 3000. All shooting 1080p/24 AVC-Intra on P2 cards. The timecode is TOD, and all the cameras and the sound were locked on the same TC. Unfortunately the show started late, and finished after midnight, and the TC reset to 00:00:00:00 3/4 of the way through four 2-hour spanned clips. Obviously the TOD should have been set 12 hours earlier and we could have avoided the whole problem, but thanks to all the overtime and meal penalties we can't afford a time machine at this point.
    The P2CMS software has no trouble connecting up the spanned clips, but FCP refuses to do it. All of the spanned clips that reset to 0 are listed as multiple incomplete clips. Can anyone think of a way to get FCP to connect those spanned clips other than converting them all to DPX in P2CMS?

    Solved!
    David Wulzen gave me this idea in relation to a different issue he was having.
    http://forums.creativecow.net/thread/193/873780
    I went through and changed the start timecode in the Contents/Clip/*****.xml files for all 70 of the clips I wanted to span, and now FCP joins them up with no problem. This saves a lot of importing and exporting time. When you're looking at over 650 GB to copy back and forth, the time really adds up.

  • Events past midnight, now showing up with start time on BOTH days.

    If you have an event on one day that goes past midnight, iCal now puts the event on both days with the same start time on both days.  How do I stop this and have it only show the start time on the First day (like it did before Mountain Lion)?

    Hi -
    Thanks for doing that. I clicked on the annotations, nothing happened, was I supposed to see additional stuff or are they just markers? I just see text balloons now.
    MDmacuser wrote:
    As far as the filter, I am just using the built in filter to FCE.
    OK, so you are basically replicating the clip on V1 on V2 and applying a blur, then using the crop tools to constrain the blur to the area that you wanted blurred - so that the blur is the only visible part of V2, the rest of V2 has been cropped transparent and is just showing through to V1 below?
    OK, click on V3 and type Control - B to temporally hide the clip. Does the effect work for masking the first ID, all through the clip?
    Now click on V3 again and type Control - B to re-enable the clip so that it is visible.
    So on V3 you replicated the clip on V1 to V3, and applying a blur, then using the crop tools to constrain the blur to the area that you wanted blurred - so that the blur is the only visible part of V3, the rest of V3 has been cropped transparent and is just showing through to V1 and V2 below?
    If you did it that way - should work.
    Let me know if I don't understand what you are doing.
    thanks
    MtD

  • How do I set up timed access control for a time past midnight

    I would like to set up timed access control for a number of my devices that would stretch past midnight...   An open network from 6AM to 2AM - effectively only blocking access from 2AM tp 6AM in the morning....
    Any notion on how to do this?  the timed factily does not like the setting to enable 6A to 2A, says the times are invalid. 
    Setting up timed access from 6AM to 11:59P, then doing another from 12A to 2A causes a service "hiccup" of 1 Minute.

    Set up each device as follows:
    Everyday........Between.......6:00 AM and 11:59 PM
    Add a second rule for each device that will state....
    Everyday.....Between.......12:00 AM and 2:00 AM
    You might think that there would be a one minute break between 11:59 PM and 12:00 AM, but that will not be the case, at least on every AirPort that I have ever programmed..  Reason.....11:59 is really 11:59:59:59 turning off at 12:00 AM.  But, you have a second rule to allow access at 12:00 AM, so the AirPort will be "on" at the same time the first rule ends, so there will be no break.
    If you really want the second rule to turn the AirPort "off" at 2:00 AM.......then set that time for 1:59 AM. If you set the rule for 2:00 AM, then AirPort will really turn off at 2:01 AM.

  • When I click on Creative Cloud logo, indicator for time passing goes for a few seconds and stops, but app not opening (it used to).  Any ideas?

    I've never used this feature to ask a question.  Pardon not knowing etiquette and such.  When I click on Creative Cloud logo/icon on my desktop, the indicator for time passing goes for a few seconds and stops, but CC app not opening. 
    CC app used to work on this same computer a few months ago.  No changes to operating system.  Photoshop is still working.  Just wanted to download Lightroom and perhaps begin learning it, but to no avail.
    Tried to look for a way to reinstall Adobe CC, but it says I already have it.
    Any ideas?
    Thank you in advance,
    Timothy

    Link for Download & Install & Setup & Activation problems may help
    -Online Chat http://www.adobe.com/support/download-install/supportinfo/

  • For about the past week, Facebook has been taking forever to load (or just not) on my mac (OSX 10.5.8; Safari 5.0.6).  Other sites are fine.  I routinely empty the cache, clear history, cookies, etc. each time I shut down.  Suggestions?

    For about the past week, Facebook has been taking forever to load (or just doesn't) on my mac (OSX 10.5.8; Safari 5.0.6).  Other sites are fine.  I routinely empty the cache, clear history, cookies, etc. each time I shut down.  Suggestions?

    I don't use Facebook, but I can say that clearing the cache every time you shut down is excessive - unless you're sure the cache is corrupt you should leave it alone.  It exists to speed up your browsing experience by loading frequently requested items from your drive rather than downloading them fresh from the internet each time.  So, I would say stop clearing your cache and see what happens.
    As for clearing cookies: I'm not sure what method you currently use, but I would recommend you download and install CCleaner.  It's free, and allows you to build up a list of cookies that you want to clear and those you want to keep, before deleting them.
    Both of these may help speed things up by reducing the amount of work Safari has to perform whilst browsing.  Regardless, I'd say that, unless there's a reason you've not mentioned for performing the "purging" that you do, making these two changes should see improvements in general web browsing if not specifically when loading Facebook.

  • Time Evaluation for work schedule during midnight

    Dear all SAP HR Expert,
    We have question regarding time evaluation.
    Our scenario is:
    Shift 1 00:00 - 07:00
    Shift 2 07:00 - 16:00
    Shift 3 16:00 - 24:00
    His work schedule:
    06.08.2010: Shift 2
    07.08.2010: Day Off (Free)
    08.08.2010: Shift 1
    09.08.2010: Shift 1
    10.08.2010: Shift 1, but he took one day annual leave on this day
    Actual data (in IT2011 and IT2001):
    clock in 06:30 of 06.08.2010
    clock out 16:30 of 06.08.2010
    clock in 23:30 of 07.08.2010 (come earlier)
    clock out 07:30 of 08.08.2010
    clock in 00:35 of 09.08.2010 (late)
    clock out 07:15 of 09.08.2010
    leave record: start date: 10.08.2010, edn date: 10.08.2010
    Base on SAP documentation that said we can never assign a time event before midnight to the next day, we have rearranged SAP configuration (DWS and PWS) to:
    DWS:
    Shift 1: 23:59 - 06:59 with tolerance 23:59 - 00:00 and 06:59 - 07:00
    PWS:
    For Shift 1, always set 1 day earlier than actual schedule.
    Thus, work schedule rule will indicate:
    06.08.2010: Shift 2
    07.08.2010: Shift 1 23:59 - 06:59
    08.08.2010: Shift 1 23:59 - 06:59
    09.08.2010: Shift 1 23:59 - 06:59
    It works!!
    Our problem is, time eval can not find clock in - clock out record for date 09.08.2010 (because record in IT2011 with date 09.08.2010 belongs to 08.08.2010) and can not match it with leave record (because leave data has start date 10.08.2010).
    Thus, time eval will generate warning message "Employee not at work".
    I hope you can give me input on how to solve this problem.
    Best Regrads,
    Achmad

    Hi,
    see thread
    Time evaluation -early clockin for shifts starting at midnight ?
    maybe of interest
    bg
    Edited by: bg on Sep 16, 2010 9:26 AM

  • I served my 90 days for downloading a past perchase on a diiferent account but now after my time is served I still can't download my own past purchases what do i do?

    I served my 90 days for purchasing a past perchase on anther account but now after the 90 days I tried to download one of my own past purchases but it wont let me. What should I do?

    No you should be able to sign in with your other (old) Apple ID and could download your purchased media. If you do that please note, that would have to wait for another 90 days, if you then would like to change it back to the other (newer) account again.

  • What is Formula for 'BS' Method of Extended Safety Stock Planning ?

    Hello SNP Experts,
    I have a Important Question regarding Extended Safety Stock Planning Calculation in SNP Module.
    I have read the SCM Help, SDN Forums and SNP Training Course help, but am unable to find the Formula to Calculate Safety Stocks using the Beta Service Level (Method 'BS') for the Extended Safety Stock Planning Methods. 
    Reading the help, training material, past SDN Questions I do understand the Standard Formula for Safety Stock is ...
    S.S  = ServiceLevel x SQRT (ReplLeadTime) x StdDevDemand
    However there are Factors like below that are definable in the Location-Product Master ...
    1.  Forecast Error %
    2.  Replenishement Lead Time Error %
    3.  Min & Max Safety Stock Levels
    4.  Beta Service Level
    5.  Max. Stock Level
    How are these Factors used ? What is the Formula using these Parameters to Calculate the Safety Stock ? The Calculation in SCM-APO is not clear from anywhere.
    I am specifically interested in the Method "BS".
    Can anyone Guide me ?  Points Guaranteed if a reply covers the exact question above (I have done some research before raising this question on Forum).
    Regards,
    Ambrish Mathur

    Harish,
    I'd seen these forums already.  Thanks for responding.
    This 'secretive' calculation is quite annoying.  If SAP does not Publish any documentation around the Formula, how can the Customer be convinced to use SAP's Safety Stock Calculations (no wonder many SAP Customers are going the 'ToolsGroup' way of Safety Stock Calculations).
    On Safety Factor (I saw in your notes) I am aware that
    a factor of 2.33 equates to 98.6% service Level from long back based on Normal Distribution.  The Formula as known much earlier is this ...
    SS = SafetyFact x SQRT (RepLeadTime) x StdDevDemand.
    based on Normal Distribution.
    However there are new Fields in APO since ...
    Is there no documentation whatsoever on how the 2 Fields -  1. Forecast Error %
    2. Replenishement Lead Time Error %
    are used at all in the SS Calculation ?
    Where do these New MasterData Parameters Plug-in ?
    The other change now is in SS Planning, the SSs could be different for each Time Bucket in Future.  How does Beta Service Level also impact the Calculation ?
    Is there a URL / Book someone can point me to ?
    Regards,
    Ambrish

  • In VB Programming code -- How to access the formula for suppressing a field

    In VB Programming code -- How to access the formula for suppressing a field
    I am using Crystal Reports 2008 v1
    Using VB code, I am attempting to modify a Crystal Report before exporting it into a PDF format and then displaying it on the Web.
    My problem is that I am unable to access the formula used to dynamically suppress a field.
    The following code is working:
    mySections = rd.ReportDefinition.Sections
    For Each mySection As CrystalDecisions.CrystalReports.Engine.Section In mySections
       ' myFieldToChange is a String set to the text of the field I need to adjust the Suppression
       iloop = 0
       For Each RecObj As CrystalDecisions.CrystalReports.Engine.ReportObject In mySection.ReportObjects
               If mySection.ReportObjects.Item(iloop).Name.ToLower = myFieldToChange Then
                   myTextObject = CType(mySection.ReportObjects.Item(iloop), CrystalDecisions.CrystalReports.Engine.TextObject)
                   myTextObject.Text = "new field text goes here"
                   mySection.SectionFormat.EnableSuppress = True
                   '  Here is where I want to change the formula for the Suppression
                End if
                iloop = iloop + 1
        Next
    Next
    I can not find any reference to the actual suppression formula in the SDK help file.
    Note, the EnableSuppress can be set to True for False, but if there is a formula for dynamic suppression, the True or False value is overwritten.  The results of the formula determine the suppression.
    Is there a way to reference this formula.  I know that I can put on in using the Crystal Report Designer software, I need to modify this formula using VB code and the SDK.

    Hello, Mark;
    If you are using the ReportDocument object you do not have access to the Conditional Suppression formula. You can get around it by using a formula field in the report for the supression and then using the FormulaField code to change it at runtime.
    If you want to change the supression condition directly at runtime you need to use RAS and the ReportClientDocument.
    Elaine

  • How can I open up more space on my external hard drive for Time Machine?

    I have a 500GB external hard drive that I use with Time Machine. I believe I have half designated for Time Machine and the other half to use as an external drive to put whatever I want on it. My issue is that now my Time Machine back up needs more than 250GB of space.
    How can I make more space available on Time Machine and less for the external half (maybe split it 400/100 for example) or just designate the whole 500GB for Time Machine?
    Am I going to have to reformat the hard drive? I'm trying to do this in a way that I'm not going to risk losing what might already be on Time Machine...
    I'm not sure how well I'm explaining this. Hopefully someone can help.
    Amanda

    I would also suggest you get a 2nd, much larger hard drive, partition it if desired, move your data to it, and start a 2nd Time Machine backup on it. You can set Time Machine to alternate between the 2 drives by adding the new drive to System Preferences/Time Machine. If you want to make a copy of your current backup on the new drive, you can do that using the Disk Utility Restore tab. If you chose to do that, make the copy first since using the Restore tab erases all data on the drive or the partition.

  • When I'm bouncing a project, it freezes or doesnt stop bouncing and keeps going past its cut off. how do i make it stop and get back to normal?

    When I'm bouncing a project, it freezes or doesnt stop bouncing and keeps going past its cut off. how do i make it stop and get back to normal?

    Hi
    chorleyman wrote:
    you do have to actually define the area to be bounced in the dialogue window that comes up - there are some discrepencies in the way that the program behaves like that,
    Apart from the "Include Audio Tail" function, which can leave Logic bouncing for a very, very long time, there are generally, no discrepancies regarding the Bounce Locators:
    If Cycle is enabled, the bounce locators will be set to the cycle locators.
    If Cycle is off, and regions are selected, the bounce locators will be set to the selection.
    If cycle is off, and no regions are selected, the bounce locators will be set from the Project Start to the project end.
    It is smart to actually check that the bounce locators are set where you would like them to be.
    wildfire31 wrote:
    When I'm bouncing a project, it freezes or doesnt stop bouncing and keeps going past its cut off. how do i make it stop
    If you get caught with a bounce that does not stop, Command . (period) should do the trick.
    CCT

  • Ringback Tones Times Limitation Problem (poor web design)

    When managing ringback tones times, I found the Start time cannot be later than the End time.
    This limitation (to continue from PM into AM) should be removed.
    I would like to set a ringback tone for Non-Business Hours and weekends: 6PM-7AM MTWTF and Full day on weekends. 
    I cannot do that because my desired Start Time is PM and the End Time is AM.
    The previous web interface would allow to go past midnight on time set.
    Also, it would be good to control minutes (from 7:30PM to 5:45AM, not only 7PM to 6AM).
    Please, advice.

    This is a user forum.  You can submit feedback directly to Apple at http://www.apple.com/feedback/itunesapp.html .

  • Macbook Pro -yosemite install stalls at disc select with ''This disc is used for Time Machine Backups' - help !

    Having downloaded Yosemite it installed fine on my iMac but on my Macbook Pro installation has frozen at the Disc Selection stage (where you want it to install) with the message 'This disc is used for Time Machine Backups'. 
    I cant find a way past this to complete the installation.
    Any ideas anyone ?
    Many thanks.    

    Time machine needs its own partition to operate. So you are not going install a OSx Lion on that volume.
    If there is enough room you may be able to partition the drive on the fly with DiskUtility
    Are you saying you clean installed Lion and you are trying to move your user Data over with TM via the migration Assistant?  Please explain.

Maybe you are looking for

  • How to maintain data in table control

    plz send a detail description of how to create table control and maintain data in that table control.

  • MacBook Air requires Bootcamp 2.0.1 and not 2.0ormer

    Took me a while to figure this one out and I couldn't find that it had been covered here. If you run the Bootcamp assistant on the new MacBook Airs, the printed documentation omits to point out that you MUST use bootcamp 2.0.1 and not 2.0. The former

  • Why did my iTunes just stop opening?  Please help

    My iTunes just randomly stopped opening on my computer at work that is running Windows 7.  I have uninstalled and reinstalled both iTunes and Quicktime and it is still not working.  Please help...this is my music source at work.

  • DADs Parameters

    Are there DADs Parameters that enhance security in Oracle Portal?

  • Automating Database, Listener, Entr. Manager Startup & Shutdown in OEL5

    Hi All, bq. I am a quite newbie to Linux, I have installed Oracle 11g on Oracle Enterprise Linux 5 on VMWare by following [this article|http://www.oracle.com/technology/pub/articles/smiley-11gr1-install.html] everything went fine. But my problem is I