Add minutes to a day

Hi,
I have a requirement to add minutes to a day.
For e.g the input parameters will be date(10/10/2006) + time(10:22:36) + mins(480) and the output has to be date + time.
I tried to use the function module "CATT_ADD_TO_TIME"  ...but seems the end time is not calculated correctly.
Thanks again,
Rajib

Hi Rajib Das,
                Please see the following code
DATA : MYDT LIKE SY-DATUM.
CALL FUNCTION 'CATT_ADD_TO_TIME'
  EXPORTING
    idate         =  vbdkl-wadat_ist " 20060731
    itime         =  v_transittime  "     240000 (having 5 spaces before)
    stdaz         =  0
IMPORTING
   EDATE         = MYDT
Iam getting error as
<b>
The call to the function module "CATT_ADD_TO_TIME" is incorrect:                                                                               
The function module interface allows you to specify only fields                 
of a particular type under "ITIME". The field "'24:00:00'" specified here       
has a different field type.                                                     </b>                                                                               
Can you please rectify my error
                                                                                Ranjith

Similar Messages

  • Add number of business days to date field

    Hello, I noticed that there is not much discussion in the forum surrounding u201Cbusiness daysu201D so I hope this post/discussion/solution contributes to the content of this forum.
    I am using the following 3 formulas to try to Add number of business days (based upon a table field) to a specified date:
    1. Variable name = SetVar
    //Set Variable for Add Business Days:
    DateVar Array Holidays;
    DateVar Target:= CDate({TMS_MOVEMENT_EVT.EVT_DATE}); // Put your field name in here
    NumberVar Add:=  {DTCI_DOD_TRANS.TRANS}; // put the number of days here to add (a positive number)
    NumberVar Added := (0);
    2. Variable name = AddBizDays
    //Adding Business Days:
    EvaluateAfter({@SetVar});
    WHILE Added < Add
    Do (target := target +1;
        if dayofweek (target) in 2 to 6 and not (target in holidays)
            then Added:=Added+1
            else Added:=Added);
    Target
    3. Variable name = HOLIDAYS
    //Holiday Array Formula for the report Header:
    BeforeReadingRecords;
    DateVar Array Holidays := [
    Date (2003,12,25),   // you can put in as many lines for holidays as you want. 
    Date (2003,12,31)
    0
    I am successfully getting my data needed to make the necessary calculations and variable assignmentsu2026 I believe that my ISSUE is that I am not sure where to place these formulas into my report so they assign the variables and execute properly when previewing my report. I am curious if that is my issue, and if so, can someone provide me direction on where to put each of these formulas in my report.
    Currently, when I try to preview the report, I get the following Crystal Reports Error:  -u201CA number, currency amount, Boolean, date, time, date-time, or string is expected here.u201D
    Then Crystal automatically opens the AddBizDays formula and highlights the word added, see below RE: u201CWHILE Addedu201D
    For reference, my report has 3 groups, and I am displaying all of my output information (and locating my formulas) in the group footer #3 report section. I have moved them around to other report sections/groups/placements, but to no success.
    Thanks so much.
    Best, Matt

    I worked this out... FYI - for the benefit of all forum users:
    ADDING BUSINESS DAYS TO A CERTAIN DATE (excluding weekends and holidays)
    1. Variable name = AddBizDays
    //Adding Business Days:
    WhileReadingRecords;
    DateVar Array Holidays;
    DateVar Target:= CDate(); // Put your field name in here
    NumberVar Add:=  ; // put the number of days here to add (a positive number)
    NumberVar Added := (0);
    WHILE Added < Add
    Do (target := target +1;
        if dayofweek (target) in 2 to 6 and not (target in holidays)
            then Added:=Added+1
            else Added:=Added);
    Target
    2. Variable name = HOLIDAYS
    //Holiday Array Formula for the report Header:
    BeforeReadingRecords;
    DateVar Array Holidays := [
    Date (2003,12,25), // you can put in as many lines for holidays as you want.
    Date (2003,12,31)
    0
    ...too bad i don't get forum points for sharing this solution.
    Special thanks to KenHamady.com -- for sharing this solution.
    Sincerely,
    Matt

  • Add Minutes to a Timestamp column

    Hello there,
    I need to know how to add minutes to a timestamp column in APEX. I was looking for an answer on the internet but the DATEADD function doesn't work in APEX. Any ideas?
    Ruben

    DATEADD is a SQL Server function.
    I think using [interval data types|http://download.oracle.com/docs/cd/E11882_01/server.112/e10592/sql_elements001.htm#i78291] and the NUMTODSINTERVAL function produces the clearest code:
    with ts_example as (
      select ename, cast(hiredate as timestamp) hirets from emp)
    select
              ename
            , hirets
            , hirets + interval '90' minute as intlit
            , hirets + numtodsinterval(90, 'minute') as numtodsint
    from
              ts_example
    ENAME      HIRETS                    INTLIT                    NUMTODSINT               
    SMITH      17-DEC-1980 00.00.00.00   17-DEC-1980 01.30.00.00   17-DEC-1980 01.30.00.00  
    ALLEN      20-FEB-1981 00.00.00.00   20-FEB-1981 01.30.00.00   20-FEB-1981 01.30.00.00  
    WARD       22-FEB-1981 00.00.00.00   22-FEB-1981 01.30.00.00   22-FEB-1981 01.30.00.00  
    JONES      02-APR-1981 00.00.00.00   02-APR-1981 01.30.00.00   02-APR-1981 01.30.00.00  
    MARTIN     28-SEP-1981 00.00.00.00   28-SEP-1981 01.30.00.00   28-SEP-1981 01.30.00.00  
    BLAKE      01-MAY-1981 00.00.00.00   01-MAY-1981 01.30.00.00   01-MAY-1981 01.30.00.00  
    CLARK      09-JUN-1981 00.00.00.00   09-JUN-1981 01.30.00.00   09-JUN-1981 01.30.00.00  
    SCOTT      19-APR-1987 00.00.00.00   19-APR-1987 01.30.00.00   19-APR-1987 01.30.00.00  
    KING       17-NOV-1981 00.00.00.00   17-NOV-1981 01.30.00.00   17-NOV-1981 01.30.00.00  
    TURNER     08-SEP-1981 00.00.00.00   08-SEP-1981 01.30.00.00   08-SEP-1981 01.30.00.00  
    ADAMS      23-MAY-1987 00.00.00.00   23-MAY-1987 01.30.00.00   23-MAY-1987 01.30.00.00  
    JAMES      03-DEC-1981 00.00.00.00   03-DEC-1981 01.30.00.00   03-DEC-1981 01.30.00.00  
    FORD       03-DEC-1981 00.00.00.00   03-DEC-1981 01.30.00.00   03-DEC-1981 01.30.00.00  
    MILLER     23-JAN-1982 00.00.00.00   23-JAN-1982 01.30.00.00   23-JAN-1982 01.30.00.00  
    14 rows selected

  • New MacBook Pro with 10.6.3 Freezes for 5-10 minutes every few days

    I've got a brand new (i7 processor) MacBook Pro with 10.6.3 OS on it. Right from the first day I had it, it has had a problem freezing for 5 - 10 minutes every few days. When it is "frozen" nothing works - cursor doesn't track the mouse, clock doesn't increment to a new minute, nothing updates on the screen.
    I turned on remote login, so I can ssh to it and see what's going on, and by running "top -o cpu" I can see that the kernel_task process is using over 100% of the CPU - other processes are getting some cycles - top, for instance - but the kernel is dominating the dispatch queue.
    When this first happened, I thought the computer was dead, so I powered off and rebooted. However, once I could see that things were still running but the display was locked up, I tried waiting. Sure enough, every time the system comes back if I wait long enough. When it comes back, everything operates just fine.
    Any thoughts on what I can do about this? I don't imagine that killing the kernel_task is a good idea(!). Maybe sending it an appropriate signal? I'm happy to get some more diagnostic information - just give me suggestions on what I can try. Note that it will have to be command line only, as I can only ssh into the laptop when it gets frozen like this.
    Thanks.
    Message was edited by: inquisitive7

    Interesting - but that poster is complaining about the mouse and keyboard being unresponsive or going dead, not the comprehensive freeze I'm experiencing (unless "go haywire" means freezing). Not only are my mouse and keyboard unresponsive, but windows on the screen stop updating - even the clock in the upper right corner stops advancing.
    For the record, I'm using the keyboard in the MBP - not much choice there - and a Razer bluetooth mouse that had no problems with my last MBP.
    Still, they could be related. Something is making the kernel get very busy for a long time before it recovers. I just wish I knew what that was AND how it eventually recovers - perhaps I can accelerate the recovery if I knew the cause.
    Anybody else experiencing the same thing? Note - I don't get a beachball and there is no cursor flashing (unlike the other thread on freezing). It looks like the system is completely hung, except that I can still ssh into the MBP and run things like top; overall, the CPU is over 70% idle.
    Message was edited by: inquisitive7

  • How to add minutes to pay as you go phone

    I'm probably missing something really obvious but I just want to add minutes to my phone online and I can't find a link anywhere, every one I click takes me to my account page where there is no option to refill.
    Any help would be great!

    Do you have a password and are you signed up on the prepaid wireless page?? After you put in your cell 10 digit  number you need to put in your password then a page will come up that will give you options on how to refill, either by using a prepaid cell card, or auto pay or buying the prepaid card or credit card.  right frim the web site and putting the number in there.  You said you can get to your account  is there something that says   MyVerison2.0 login?  or veriizonwireless.com/myverizon and enter  your 10 digit cell number and password, if you do not have a password you will have to register and you will be offered different ways to  refill your cell. Hopes this helps.
    Message was edited by: Minniehaha

  • FP-2000 clock is 15 minutes slow per day

    My FP-2000 system clock is about 15 minutes slow per day. How come?
    Is it possible to adjust it?
    Because it is running stand-alone it cannot be adjusted remotely. It is only connected to a PC every once in a while.
    Regards,
    Gerwim

    Hello Gerwim,
    The clock on the FP-2000 has normaly an accuracy of about +/- 1min/Month. However the process on the controller that is running the clock is a low priority process. When you controller has higher priority tasks to perform, which take a lot of processing power, it can happen that the clock will get behind more then usual. When a host computer is connected to the system the controller will check with the host computer (its time server) if the clock is running correctly and adjust it when needed. At Stand-Alone Base this timeserver is not available.
    There is a VI under: Real-Time>>RT Utilities which is called RT Set Date and Time which can be used to set the date and time on the controller. The problem is however that you would need a reference to set your clock to. If the amount of time the clock runs behind every day is pretty consistend maybe you can use this VI to adjust the clock with a certain amount of minutes every now and then. Ofcourse you still will not have a very accurate clock setting but still more accurate as it was. The only other option you would have is a permanent time-server connected to the FP controller. 
    Hope this helps,
    Regards,
    RikP - National Instruments Applications Engineering
    Rik Prins, CLD
    Applications Engineering Specialist Northern Europe, National Instruments
    Please tip your answer providers with kudos.
    Any attached Code is provided As Is. It has not been tested or validated as a product, for use in a deployed application or system,
    or for use in hazardous environments. You assume all risks for use of the Code and use of the Code is subject
    to the Sample Code License Terms which can be found at: http://ni.com/samplecodelicense

  • Add minutes to date

    I have a form in which I have to add the date value to time.
    i.e. I have a variable that stores date in the format 'DD-MON-RRHHMIPM'
    To this value of date, I have to add time which is stored in an other variable in the format 'HH24MI'.
    I can do this using INTERVAL on SQL PLUS, but how can I do it in forms9i?
    p.s. Please save me from fractional calculations, i.e. convert time to fraction of hours.
    Edited by: Sheel on Nov 17, 2008 3:10 AM

    With dates, the unit (1) represents one day. So one hour is 1 /24 and one minute is 1/24/60, and so on.
    If you want to add ten minutes to a date:
    select sysdate, sysdate + (10 * (1/24/60)) from dual;Francois

  • Add number of working days

    I have to subtract a number of 'working days' of a date field in my message mapping.
    I wrote a user defined function. I used cal.add(Calendar.DATE, -3); on the instance cal of the class Calendar. It subtracts 3 days, but I have to subtract 3 'working days'.
    Has anyone a suggestion how to achieve this?
    Kind regards
    Frank

    Frank,
        Since you said that there is FM available in R/3 DATE_CHECK_WORKINGDAY. I would suggest you to do RFC Lookup and get the response if it not working day, then subtract 1 from the current day, and again do lookup to check whether its working day or not. Finally if you get the response as Working day, then subtract 3 from the day(not from the current date, instead the subtracted date , in my previous step).
    But  it will not solve your issue. The above I said is an approach. Because, consider the below example.
    Current day is Saturday, you r doing RFC lookup and getting response as not-working day. Hence on subtracting 1 you will get Friday, now again you are doing RFC look up , this time you will get response as working day , immediately you will subtract 3 from friday, Finally you will get the result as tuesday!!!!
    Do you think its correct? Yah sometimes, because while subtracting 3 from friday we have to make sure that thursday & wednesday must not be holiday. I think you got my example, If I'm wrong , please reply me back.
    Hope it clears.
    The above is an approach, its not the solution. If you look its good we have to apply logic to ahieve the result.
    Best Regards,
    raj.

  • How do I add a photo to day one

    I can't see how to add a photo to a day in Day One since the last update.  There used to be a camera icon at the bottom of each day, now there is not.
    Please help. Thank you

    There is - at least for me. It's the center icon at the bottom of the text entry areaa just above the keyboard.

  • FM which gives the date if we add 'x' number of days to the current date.

    Hi all,
    can you plz tell me the FM which will give me the exact date if i add some ' X ' number of days to the present date.
    in detail -->my inputs would be    1)DATE
                                                    2)no of days
    i need--> the exact date which comes after those days get added to the given date.
    PLZ HELP ASAP.
    Rgds,
    REDDY.

    Hi,
    You can use FM RP_CALC_DATE_IN_INTERVAL.
    data: wa_date  like sy-datum.
    *Add 21 days to current date.
    call function 'RP_CALC_DATE_IN_INTERVAL'
             exporting
                  date      = sy-datum
                  days      = 21
                  months    = 0
                  signum    = '+'
                  years     = 0
             importing
                  calc_date = wa_date.
    write: / wa_date.
    Regards,
    Ferry Lianto

  • Add Minutes to Date Time Stamp in Select Query

    Hi,
    I have date in one column and Minutes (240,480,.....etc) in another column.
    Below is the date format which i select in select query, now how should i add date column below with Minutes Column.
    to_char(Last_update_date,'DD/MM/YYYY HH:MI:SS AM')
    Thanks
    Pravin

    892547 wrote:
    Hi,
    I have date in one column and Minutes (240,480,.....etc) in another column.
    Below is the date format which i select in select query, now how should i add date column below with Minutes Column.
    to_char(Last_update_date,'DD/MM/YYYY HH:MI:SS AM')
    Thanks
    Pravinyou can NOT add to character datatype.
    what datatype is MINUTES column?

  • How to add minutes to date in java

    I have date in string variable, i have to add/subtract minutes from it, please adivce , how i could do in java 1.5
    sample data
    String olddate = "12/16/2010 4:58:29 PM"
    String minutes1 = "300"
    i would like to get value as below for above data
    String newdate ="12/16/2010 9:58:29 PM"

    Use SimpleDateFormat to convert the date object to string. Once the string object converted to date object use the getTime() method to get the date in milliseconds.
    Now you can easily adds/substract the date object.
    Remember, the resulting long value from getTime() method is in milliseconds, to get the value in minutes you need to multiply it by 1000 and by seconds in a minutes, that is 60.
    When your subtraction/adds done convert it back to date object.
    This is the codes:
    import java.text.SimpleDateFormat;
    import java.text.ParseException;
    import java.util.Date;
    public class DateCalculator {
         public static void main(String[] args) throws ParseException {
              String olddate = "12/16/2010 4:58:29 PM";
              System.out.println("old Date: "+olddate);
              SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy h:mm:ss a");
              long oldDateInMillis = formatter.parse(olddate).getTime();
              String minutes1 = "300";
              String newDateAdds = formatter.format(new Date(oldDateInMillis + Long.valueOf(minutes1)*1000*60 ));
              String newDateSubstract = formatter.format(new Date(oldDateInMillis - Long.valueOf(minutes1)*1000*60 ));
              System.out.println("new Date [Additions] : "+newDateAdds);
              System.out.println("new Date [Substraction] : "+newDateSubstract);
    }

  • Add-On expiry; 30 days or next billing day (rolling 1-month data only contract).

    I'm on a rolling monthly data-only sim/contract. I was running low on my data allowance for this month, so I've added a 10Gb add-on. At each point during the buying process it stated this add-on would expire at my next billing date (about 5 days time) - i.e.even if not used up. However after buying it, the 'thank you' notification and also the subsequent details in 'my account' claim it expires in 30 days (and of course the system is fully aware that my billing day is sooner). It can't be both, and I've found conflicting information when searching for the answer too. I would use the add-on very differently if I had 30 days instead of 5 to use it! Can anyone tell me for sure which it actually is?  CheersKev

    Well its gone past the date my rolling months allowance usually begins on. The good news is that (on this occasion anyway) the addon didn't expire as some parts of the system suggested. Thats assuming by 'billing date' they mean the date of the bill, not the date they subsequently collect payment. Oddly though, the addon is now showing (in 'my account') as 'data left in your plan' rather than as an addon to the plan. And my plan's allowance isn't showing up for this month yet, as if buying the addon has somehow prevented the monthly data contract rolling on (I definately bought an 'add-on', not an 'instead-off'!). So I'm hoping this month's plan is just being queued until the existing addon expires. Which would be completely sensible, but theres nothing (that I can see) to indicate if its the case; currently it looks like there will be nothing left once the small addon runs out. I guess I'll (again) just have to wait to see what actually happens in practice. I'm new to this and so its inevitably a learning curve, but I can't help feel the 'my account' system could be a bit more illuminating :-/ CheersKev

  • Add 45 or 90 days to an input date, depending on date

    I'm a newbie - I want to add 45 days to an input date if it is before 01/01/2012 and add 90 days to the input date if it is after 01/01/12. So far, i have the following:
    if (LEOPDate100B_RequestedBOE.rawValue ne null) then
    Num2Date(Date2Num(LEOPDate100B_RequestedBOE.formattedValue,"MMM D, YYYY")+ 90,"MMM D, YYYY")
    else
         null
    endif
    I'm not sure how to add the qualifier date. I've looked in all the forums i can find and can't find any help. Any assistance is greatly appreciated!

    Hi Paul,
    I modified code TextField1.rawValue = TextField1.rawValue + 365
    to TextField1.rawValue = TextField1.rawValue + 365 * 24 * 60 * 60
    I enter in EffectDate 08/30/2010 and get in ExpDate field wrong date like 4/19/8353. How to fix it? How to make ExpDate field empty if EffecDate is empty?
    Thanks.

  • Using 10MB data pro minute since two days, how is this possible

    My iphone 4 is using pro minute 10 mb data. This is since two days.I do not know how this is possible. An i do not know how to stop this.

    I really do not know. I went to a i center. They do not know how to help me. I have a few apps. Not a lot. It started wednesday at 12:09. I think that I was driving at that moment in my car.

Maybe you are looking for

  • How do I remove an unwanted Airport Express from my network?

    I have been using a Time Capsule for several years.  I am having trouble backing up to my Time Capsule.  I have discovered an unknown Airport Express in my network.  I've changed networks, added passwords to the network, etc.  How do I remove this un

  • Can't play video

    I can't play any videos such as Youtube

  • Transfer Bridge to OLAP

    Hi, When i try to transfer a Collection to the olap server using warehouse bridge i get the following error: **! Transfer logging started at Wed Jul 07 19:38:55 BRT 2004 !** OWB Bridge processed arguments **! Transfer logging stopped at Wed Jul 07 19

  • Suppressing model update

    using jsf/adf bc. i've got a jsf page with subtabs on it. tab 1 has a checkbox on it which when checked (and saved), should disable other fields on the tabs. i have their disabled property set with el to evaluate the value of the checkbox. this check

  • How to set default value of session management alert

    Dear Sir, Our server is EP7 , I would like to set the default value of session management alert to be "OFF". Because now the default value of session management alert to be "ON".  And I must manual set when the server start every time. Please kindly