Current  date  in  add mode ?

i want to show the current  date  in  add mode but it s not working
is there any changes thats working properly.
If oForm.Mode = SAPbouiCOM.BoFormMode.fm_ADD_MODE Then
            oEdittext = oForm.Items.Item("MrolVal").Specific
            oEdittext.String = Format(DateTime.Today, "ddMMyy")
        End If

Hi John,
Try this Code:
string dtdate=DateTime.Now.Date.ToString("MM/dd/yy")
string strdate= GetEditTextDateValue(dtdate);
public   string  GetEditTextDateValue(string  dtdate)
               try
                    string date;
                    string Year,Month,Day;
                              Day =(dtdate.Substring(0,2));
                              Month=(dtdate.Substring(3,2));
                              Year  =(dtdate.Substring(6,4));
                              date =(Month.ToString() + "-" + Day.ToString() + "-" + Year.ToString());
                              return date;
               catch(Exception ex)
                    throw ex;
And Finally you can set the Value as
oEditText.Value=strdate;
By this way you can set any kind of Date Value to the EditText.
HTH
Prashant Bansal

Similar Messages

  • Outlook iCloud add in - data execution protection mode

    I am using Windows 7 with MS Office 2010. This is a corporate laptop.
    I want to integrate my view of the Apple Calendar with the Outlook calendar so I can see all personal and professional calendar events without integrating the two into a single calendar. I am able to initiate the integration, during which, the initial calendar is downloaded and all current scheduled items will appear in the Calendars window in Outlook. However, no updates will be pushed.
    I went through a long series of trouble shooting activities to get the iCloud Outlook add-in properly set up as recommended on various Apple trouble shooting pages. Ultimately, I installed the lastest version of iCloud, reset all aspects of enabling it and all appears in order. That is, I can see the add in in the Outlook Add-Ins Center.
    However, the situation has not changed.  The reason why is, the Add-In has been disabled with the following message:
         Add-In was disabled by the user after a Data Execution Prevention failure
    Upon further investigation on the Microsoft site, it appears that the iCloud Add-In is somehow not compliant with the Data Execution Prevention mode. This mode is turned on in the Trust Center and it is strongly recommended that it not be turned off in order to protect the PC. According to the information on Microsoft, it was disabled after an error occured.  However, I received no error messages during the enablement process.
    I don't know where to look from here. Please help!

    I've conducted further research on this issue and found the following Microsoft article on DEP. According to this, the iCloud add-in is running executable code from pages marked by Windows as non-executable. In essence, this is the kind of behavior viruses exhibit and are, therefore, worth stopping.
    Can someone tell me, are you experiencing this problem? Am I alone in this or are lots of people not protecting themselves from the very fundamental virus hole?
    http://blogs.technet.com/b/office2010/archive/2010/02/04/data-excecution-prevent ion-in-office-2010.aspx

  • Automatically add a current date at the end of the comments

    Hi,
    I have a form on a table with 5 fields... on one the field I am asking my users to enter comments...
    I am looking for a functionality to automatically add a current date at the end of the comments, only when they are updated or newly filled in...
    Please advice how can I do it... I am anticipating some sort of a trigger on column (when the data is modified)...
    Thanks

    automatically add a current date at the end of the comments, only when they are updated or newly filled inDo you want to add the date to the page item itself and hence show it to the end user as and when its changed, thn
    Assuming comments item is named '*P1_COMMENTS* , add the following to the "execute on load"
    $('P1_COMMENTS').change( function(){
      var d = new Date();
      $s('P1_COMMENTS', $v('P1_COMMENTS')+ d.toUTCString() );
    });If its to be done only when updating ie in the PLSQL block
    UPDATE <table name>
    SET <comments _column> = (  SELECT DECODE(  NVL(<comments _column>,'')
                                                                          ,NVL(:P1_COMMENTS,'')
                                                                          ,<comments _column>
                                                                          ,:P1_COMMENTS||TOCHAR(SYSDATE,'DD-MON-YYY')
                                                  FROM DUAL
    WHERE <condition>

  • Add one day to the current date

    Hi all,
    A stupid question...
    How can I add one day to the current date in a select. I want something similar to add one month to current date, but with days:
    something like:
    select TO_CHAR (ADD_MONTHS (SYSDATE, -1), 'DD-MM-YYYY')
    from dual
    Thanks

    select sysdate+1 "add one day" from dual;

  • Adobe LiveCycle Designer 8 - Add days to Current Date in another text field

    Hi-
    I am working on an expense report. I have six fields, CurrentDate, and countDate1 through countDate5. The CurrentDate is a Time/Date field which the user can select whatever date is needed with the drop down calendar. The other five countDate fields are "text" fields which will represent Monday through Friday. I would like to add zero days to whatever the user selects as the CurrentDate and make that appear in countDate1 which represents Monday(the CurrentDate the user selects will always be a Monday), add one day to whatever the user selects as the CurrentDate and make that appear in countDate2 which represents Tuesday...and so on. I realize this is probably basic for someone familiar with FormCalc but I'm very new at this.
    This got me very close but I want the user to select the date and not have the CurrentDate already filled in.
    CurrentDate - DateTime field, FormCalc calculation script:
    num2date(Date())
    Date1 - Text field, FormCalc calculation script:
    Num2Date( Date2Num(CurrentDate.formattedValue))
    Date2 - Text field, FormCalc calculation script:
    Num2Date( Date2Num(CurrentDate.formattedValue) + 1 )
    Thanks!
    Brian

    Here is an exmaple of adding days the script is used in the "exit" event for the date select field that has display format of "MM/DD/YYYY". Adding days requires add x number of days to the days since the epoch date for the current date, adding months or years one needs to manipulate the string parts of the date.
    ----- form1.#subform[0].InputDateField::exit: - (FormCalc, client) ---------------------------------
    // fomatted string for selected date
    var sFmtDateValue = $.formattedValue
    var sMsg = Concat("Entered date formatted: ", sFmtDateValue) // build message string
    sMsg = Concat(sMsg, "\u000a" ) // add new line to message
    // convert date string to days since epoch date - format is important
    var fDaysPast = Date2Num(sFmtDateValue, "MM/DD/YYYY")
    // add 7 days to days past epoch date
    var f7DaysPlus = fDaysPast + 7 // add 7 days
    var s7DaysPlus = Num2Date(f7DaysPlus, "MMM DD, YYYY") // format string for 7 days plus
    sMsg = Concat(sMsg, "\u000a", "Plus 7 Days: ", s7DaysPlus) // build message string
    // add 14 days to days past epoch date
    var f14DaysPlus = fDaysPast + 14 // add 7 days
    var s14DaysPlus = Num2Date(f14DaysPlus, "MMMM DD, YYYY") // format string for 7 days plus
    sMsg = Concat(sMsg, "\u000a", "Plus 14 Days: ", s14DaysPlus) // build message string
    // display results
    // work on months
    // get parts of date past epoch date
    var sFullYear = Num2Date(fDaysPast, "YYYY") // get 4 digit year form days past epoch date
    var sMonth = Num2Date(fDaysPast, "MM") // get month form days past epoch date as number
    var sDate = Num2Date(fDaysPast, "DD") // get date form days past epoch date as a number
    var s2Month = Sum(sMonth, 2) // add 2 months
    var s2FullYear = sFullYear
    // if more than 12 months in new date adjust year on number of months
    if (s2Month > "12") then
    s2FullYear = Sum(s2FullYear, + 1) // increment year
    s2Month = Sum(s2Month, - 12) // adjsut months
    endif
    var s2MonthsAdded = Concat(s2Month, "/", sDate, "/", s2FullYear) // date string
    sMsg = Concat(sMsg, "\u000a", "Added 2 months: ", s2MonthsAdded) // display stringxfa.host.messageBox(sMsg, "Sample Adding Days" ,3, 0);
    var s5Month = Sum(sMonth, 5) // add 5 months
    var s5FullYear = sFullYear
    // if more than 12 months in new date adjust year on number of months
    if (s5Month > "12") then
    s5FullYear = Sum(s5FullYear, + 1) // increment year
    s5Month = Sum(s5Month, - 12) // adjsut months
    endif
    var s5MonthsAdded = Concat(s5Month, "/", sDate, "/", s5FullYear) //build Date string
    sMsg = Concat(sMsg, "\u000a", "Added 5 months: ", s5MonthsAdded) // display stringxfa.host.messageBox(sMsg, "Sample Adding Days" ,3, 0);
    // display results
    xfa.host.messageBox(sMsg, "Sample Adding Days and Months" ,3, 0);

  • 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

  • I want to add 2 months to the current date

    actally i want to add 2 montsh fro teh current date.but i have to consider the month of february for the calculation and even the leap year.
    so can u guys help me out .
    waiting for the reply
    thanks in advance.

    Hi Rajeev ,
    Welcome to SDN.
    Check this and execute the code.
    This will cover the leap year also.
    data: date like sy-datum,
          date1 like sy-datum.
    date = sy-datum.
    CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
      EXPORTING
        date            = date
        days            = 00      
        months          = 02     "no of months
       SIGNUM           = '+'  "months added
        years           = 00
    IMPORTING
       CALC_DATE       = date1. " new date
    write:/ 'new date',  date1.
    regards.
    vijay

  • How to add 15 days to the current date

    Hi everyone,
    I have the following doubt.
    I stored the current system date in to a variable.Now I want to store the date which is 15 days after the current date in to a new variable.
    ie current date:1-aug-09
    later date:1-aug-09 + 15 days ie 16-aug-09.
    Plz help me in solving this problem.
    Thanks & Regards,
    srinivas

    jaligamasrinivas wrote:
    I used String variable to store the current Date.
    Now in new string variable i want to store the date after 15 days from current dateSee reply #2. String is not the right type, to be doing date arithmetic, just like it wouldn't be the right type to do numeric arithmetic. You wouldn't store integer values as strings and ask how to add them up, would you?

  • How to Add 15 Days to the current Date in eCATT

    Hello eCATT Guru's,
    How to add 15 days to the current date in eCATT.
    I have changed the Date format to mm/dd/yyyy.
    now i want to add 15 days to the sy-datum.
    How to do that.do any one know?
    Thanks in Advance,
    Raj

    Check out this link -
    http://help.sap.com/saphelp_46c/helpdata/en/d7/e21a50408e11d1896b0000e8322d00/frameset.htm
    It gives details about DATE variables in CATT. Hope this will help you out.
    ashish
    Reward points if you find this helpful.
    Message was edited by: Ashish Gundawar

  • J2ME: add a week to the current date

    I want to add a week to the current date but the output has to be a valid date. I can't figure it out how to solve the problem :(.
    Can anybody help me with my problem?
    TIA

    a better approach...
              Calendar today = Calendar.getInstance();
              Date d = today.getTime();
              System.out.println("todays Date="+d);
              today.add(today.DATE, 7);
              Date d1 = today.getTime();
              System.out.println("nextDate="+d1);

  • How to get currently logged in user on 'Bill of Material' Form in Add-Mode

    Dear All,
                    I am using a UDF on 'Bill of Material' Form in SAP. This UDF is named as Current_User. I want in this UDF the user name that is currently logged in to SAP. I am able to get user name at form load event. But when 'Bill of Material' Form comes in ADD Mode, the user name doesn't display. What can I do for this problem.? Here is my code:
    public override void Handle_SBO_ItemEvent(string FormUID, ref SAPbouiCOM.ItemEvent pVal, out bool BubbleEvent)
                BubbleEvent = true;                 
                try
                    if ((mst_FormUIDModal != null))
                        if (FormUID != mst_FormUIDModal)
                            bool dbo_FormFound = false;
                            foreach (SAPbouiCOM.Form dsa_Form in this.SBO_Application.Forms)
                                if (dsa_Form.UniqueID == mst_FormUIDModal)
                                    if (FormUID != mst_FormUIDModal)
                                        if (this.SBO_Application.Forms.Item(mst_FormUIDModal).Selected == false)
                                            this.SBO_Application.Forms.Item(mst_FormUIDModal).Select();
                                        BubbleEvent = false;
                                        return;
                                    dbo_FormFound = true;
                            if (!dbo_FormFound)
                                this.mst_FormUIDModal = null;
                    if (pVal.BeforeAction == false)
                        switch (pVal.EventType)
                            case BoEventTypes.et_FORM_LOAD:
                                    if (pVal.FormType == -672)
                                        Program.Curr_User = SBO_Company.UserName;
                                        doc_form = this.SBO_Application.Forms.GetForm(pVal.FormType.ToString(), pVal.FormTypeCount);
                                        ((SAPbouiCOM.EditText)doc_form.Items.Item("U_User").Specific).Value = Program.Curr_User;
                                } break;

    Hi,
    You need not to write any sdk code for this task. You just create a user query as mentioned above and save it with some name.
    Then Open the Bill Of Material Screen, just click in the required field, then click alt + shift + f2 to assign a Formatted Serach.
    Then Select 3 rd Option       "Search in Existing User-Defined Values According to Saved Query"
    Then Click on the button "Open Saved Query"
    It will open the Query Manager. Select the Saved Query.
    Enable the Option "Auto Refresh When Field Changes"
    In the Drop Down list, select the Value "Parent Item"
    Then Select the Option Refresh Regularly or Display Saved Values.
    This will automatically put the user code if the parent item is selected.
    You an achieve this by without SDK Code.
    PS:
    There is a change in the Above Query:
    Select USER_CODE from ousr where userid = $[USER]
    Edited by: Manikandan K on Dec 22, 2011 2:00 PM

  • Add Current Date  - What timezone is used to display value

    When adding the Add Current Date Transformation to get the 'processing date', what determines the date/time that is presented? Where does it pickup the timezone and can this be tailored?
    Thanks.

    Might just be a display issue. Right-click on the date/time in the Results Browser to see the time zone. You can also change your view of the date/time if you want to. A blue dot will appear in the cell to indicate that you are displaying the value in a different time zone.
    If you want to process the data in a certain way ('stamp it into a given timezone' different from the server timezone) you could use the data type converters to convert to string and back to date/time with the options set to the timezone you want.
    I believe there is a property that can override the Director Time Zone on the server but it is not normally used.

  • Add current date to PDF documents

    This doesn't seem like it should be hard, but I have been unable to find information on how to do it.
    I have about 100 PDF files. Somewhere on them, I need to display "Date Printed: dd mmm yyyy", and have the current date displayed.
    I don't care whether this is placed at the top of the page, the bottom, or opaque in the background.
    I would like to be able to accomplish it using the batch command, but will perform manually if necessary.
    I have Acrobat 7 Professional.
    Can someone please help me out?

    Hi Everyone -<br /><br />Thanks to Dimitri, I was able to do exactly what I wanted to do by using the following code:<br /><br />  // Check for existing field and make sure it's on the first page<br />  var strModName = "DocMessage";<br />    var ofield = this.getField("DocMessage");<br /><br />     // Create Field if it doesn't exist<br /><br />    if(ofield == null)<br />    {<br />       // Field is the width of the page, on the bottom of the page<br />       // and 40 points high (72pts/inch)<br /><br />       for(var i=0;i<this.numPages;i++)<br />       {<br />         var rectField = this.getPageBox("Crop",i);<br />         rectField[1] = rectField[3] + 14; // Set Top<br />         ofield = this.addField({cName: strModName,cFieldType: "text",<br />         nPageNum:i ,oCoords: rectField});<br />         ofield.alignment = "center"; //This is the text alignment of the field<br />         ofield.multiline = true;<br />         ofield.textSize = 8; <br />         ofield.textFont = "Arial";<br />         ofield.display = display.noView; //This is hidden on the page but printable to make viewable change to display.visible or noView<br />        ofield.readonly = true;<br />       }<br />    }<br /><br />    // Add Field to Document Script<br />    var strJS = 'var ofield = this.getField("DocMessage");';<br />    strJS += 'ofield.value = "Intellectual Property of My Company - CONFIDENTIAL. ";';<br />    strJS += 'ofield.value += " Document printed " + util.printd("ddmmmyyyy",new Date()) + ".";';<br />    this.addScript("AddMessage",strJS);<br /><br />However - Now I would like to change the message to say that the document expires on a future date. For example, 14 days from today. I found an example of how to do this on page 266 of the Adobe JS Scripting Guide and have followed it to the letter, but it is not working. Here is the modified code:<br /><br /> // Check for existing field and make sure it's on the first page<br />  var strModName = "DocMessage";<br />    var ofield = this.getField("DocMessage");<br /><br />     // Create Field if it doesn't exist<br /><br />    if(ofield == null)<br />    {<br />       // Field is the width of the page, on the bottom of the page<br />       // and 40 points high (72pts/inch)<br /><br />       for(var i=0;i<this.numPages;i++)<br />       {<br />         var rectField = this.getPageBox("Crop",i);<br />         rectField[1] = rectField[3] + 14; // Set Top<br />         ofield = this.addField({cName: strModName,cFieldType: "text",<br />         nPageNum:i ,oCoords: rectField});<br />         ofield.alignment = "center"; //This is the text alignment of the field<br />         ofield.multiline = true;<br />         ofield.textSize = 8; <br />         ofield.textFont = "Arial";<br />         ofield.display = display.noView; //This is hidden on the page but printable to make viewable change to display.visible or noView<br />        ofield.readonly = true;<br />       }<br />    }<br /><br />    /* Create a date object containing the current date. */<br />    var d1 = new Date();<br />    /* num contains the numeric representation of the current date. */<br />    var num = d1.valueOf();<br />    /* Add fourteen days to todays date, in milliseconds. */<br />    /* 1000 ms/sec, 60 sec/min, 60 min/hour, 24 hours/day, 14 days */<br />    num += 1000 * 60 * 60 * 24 * 14;<br />    /* Create our new date, 14 days ahead of the current date. */<br />    var d2 = new Date(num);<br />    // Add Field to Document Script<br />    var strJS = 'var ofield = this.getField("DocMessage");';<br />    strJS += 'ofield.value = "Intellectual Property of My Company - CONFIDENTIAL. ";';<br />    strJS += 'ofield.value += " Document expires on " + util.printd("ddmmmyyyy", d2) + ".";';<br />    this.addScript("AddMessage",strJS);<br /><br />The resulting output is simply: "Intellectual Property of My Company - CONFIDENTIAL." The part of the message regarding the expiration date doesn't even show up.<br /><br />Anyone have any suggestions?

  • Cannot input data in matrix field when the form is in add mode.

    I have created an addon form using UDO.The UDO has four child tables.  I input data in the master data fields in form it works but when I come to matrixes for giving data in matrix fields I was unable to input data there .But after saving the data only with master data I reopend the the form with same data using find option.Now the form allows to input data in matrix fields.Please provide a solution so that I can input data in the matrix columns when the form is in add mode.

    Hi,
    After opening the Customized form you have to add a new blank row into your matrix also.
    oMatrix.AddRow(1,1);
    After then only you can input data.
    regards:
    Sandy

  • How do I add a current date to a form field so that it will give me the current date each time it is opened?

    I have adobe 9 pro. I am currently adding fields to a document and would like my date field to display the current date when the document is opened so that the user does not have to enter the date each time. How do I do that?

    Have you searched for this issue. It has been answered many times.
    Example Acrobat JavaScripts
    Scroll down to the . Insert Today's Date into Form Field section.

Maybe you are looking for