How to add date in XSLT?

All,
soa version: 11.1.1.4
There is a requirement for me to add date to the current date in XSLT.  I searched in 'Data functions', there I couldn't find any pre-defined functions.  How do I achieve it in XSLT?  Any help is appreciated.
thanks
sen

Hi Sen,
You can do this using the below:
<xsl:value-of select="xp20:add-dayTimeDuration-to-dateTime(xp20:current-dateTime(),'P1D')"/>
You can change the P1D based on the number of days you want to add.
For example 3 days = P3D
Thanks,
Deepak.

Similar Messages

  • How to add date with month after convert number to month?

    How to add date with month after convert number to month?
    Month Date Result
    24 21/11/09 24*(21/11/09)
    I want to add both the column and result should be 21/11/11
    Thanks
    Nihar

    Hmm,
    Because, you are using YYYY for '09'.
    SQL> ed
    Wrote file afiedt.buf
      1* select to_char(to_date('10/01/09','DD/MM/RRRR'),'DD/MM/YYYY') from dual
    SQL> /
    TO_CHAR(TO
    10/01/2009
    SQL> ed
    Wrote file afiedt.buf
      1* select to_char(to_date('10/01/09','DD/MM/YYYY'),'DD/MM/YYYY') from dual
    SQL> /
    TO_CHAR(TO
    10/01/0009Or with Add_months
    SQL> ed
    Wrote file afiedt.buf
      1* select to_char(add_months(to_date('10/01/09','DD/MM/YYYY'),36),'DD/MM/YYYY') from dual
    SQL> /
    TO_CHAR(AD
    10/01/0012
    SQL> ed
    Wrote file afiedt.buf
      1* select to_char(add_months(to_date('10/01/09','DD/MM/RRRR'),36),'DD/MM/YYYY') from dual
    SQL> /
    TO_CHAR(AD
    10/01/2012-Arun

  • How to add data in a file

    hi,
    I have written following code.I have a file. i want to add data in this file.
    When i add data then data is added but i donnot get the previous data. What`s the problem of my code? Is there anyone can help me? how i will add data with the previous data? Please help me.
    String username=request.getParameter("UserName");
    String userage=request.getParameter("UserAge");
    String address=request.getParameter("UserAddress");
    String sex=request.getParameter("sex");
    FileWriter f = new FileWriter("d:\\download_dreamweaver\\Project_3\\WebContent\\SaveData.txt");
    f.append(username);
    f.close(); ith regards
    bina

    Looks like you're creating a new file (which overwrites the old one) every time. You need to open the file first and then append to it.

  • How to compare date in xslt

    hi
    i need to compare the date in xslt . i was not able to get the current date in xslt.. so i entered through parameter by java. now i have the current date and in xml i have two field fromdate and todate i need to compare that some data should display when current date comes between fromdate and todate. can u tell me how to do it .
    try to provide some code....
    i was looking for some format date function but could get it
    xsl:if test="data/fromdate > currdate and date/todate < currdate"
    it is not working becouse i am not able to convert my varriable to date type... may be
    please help
    anagh

    Hi,
    I am running into a same problem with xsl :-
    a) I need to generate the current date and store it in a field
    b) I have a date field with a End date entered by the user..
    I need the xslt to minus the current date from the enddate and show the number of days / weeks left.
    How can i do this ?
    Rgds,
    Manoj

  • How to add data in xml file

    Hi ALL
    I want to add new fields on seeded EBS page to store their values in hr_api_transaction table whoch contain information of other fields on that page which are seeded
    but that table has one column which stores xml file and that xml file has all information about that page's fields
    how can I store my custom fields values in that xml file ?

    Hi,
    As Andy said,  add data to an xml file is overwriting, if you mean append data to xml file, please look this article:
    http://codesamplez.com/programming/linq-to-xml-tutorial, Since this issue is more related to ASP.net, you could also ask this issue in asp.net forum:
    http://forums.asp.net/
    Best Regards,
    Jambor
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to add data into JTable

    How can I add data into JTable, for instance ("Mike", "Gooler", 21).

    How can I add data into JTable, for instance ("Mike",
    "Gooler", 21).You will have very good results if you segregate out the table model as a seperate user class and provide a method to add a row there. In fact, if you use the table to reflect a database table you can add the row inplace using the existing cursor. I believe it's TableExample2 in the jdk\demo\jfc\TableExamples that has a very good example of this.
    Walt

  • How to add data

    hi everyone ! i have created a view object based on 2 entities objects (EMP and Departaments of hr schema)
    but i have also modified the sql query of the view in this way :
    SELECT Employees.EMPLOYEE_ID,
    Employees.FIRST_NAME,
    Employees.LAST_NAME,
    Employees.DEPARTMENT_ID,
    Departments.DEPARTMENT_NAME,
    Departments.DEPARTMENT_ID AS DEPARTMENT_ID1
    FROM EMPLOYEES Employees ,DEPARTMENTS Departments
    where Employees.DEPARTMENT_ID(+) = Departments.DEPARTMENT_ID
    and i have created a tables based on this view object..... in this table are shown those empl. that doesnt have departaments.... what i want to do is how can i add data to those rows wich doesnt have employess but have departaments???
    Thanks in advance :)

    Hi,
    I think you can resolve that problem using EL expression condition, try the following in your table:
    <af:table ...>
    <af:column headerText="#{bindings.EmployeeDepartment.labels.FirstName}"
    binding="#{backing_EmployeeDepartment.column2}" id="column2">
    <af:outputText value="#{row.FirstName!=null? row.FirstName: 'No Emp Found'}"
    binding="#{backing_EmpDept.outputText2}"
    id="outputText2"/>
    </af:column>
    </af:table>
    Regards,
    Ahmad Esbita

  • How to add data in related issue field in issue tracking list sharepoint 2013

    Hi,
    I'm using out of box Issue Tracking List. In Related Issue I want to add some data like :- Business, Technical, HR, Contractor etc in right side so user can select one of them add it. Not sure how to add these data in Related Issue column. Please advice.

    Related Issues is a lookup column to the same list which is Issue Tracking List. so you can add new items where title is Business, Technical, HR, Contractor etc then you will get those under related issues.
    My Blog- http://www.sharepoint-journey.com|
    If a post answers your question, please click Mark As Answer on that post and Vote as Helpful

  • Script task how to add date value

    hi
    i have following code i am trying to add date into script task
     Public Overrides Sub CreateNewOutputRows()
            Dim vars As IDTSVariables100
            Dim vars1 As IDTSVariable100
            Dim recordCount As Integer
            Dim rdate As Date
            ' Dim recount As Integer
            '  Dim rcount As Integer = 0
            'Get the record count
            Me.VariableDispenser.LockOneForRead("RecordCount", vars)
            recordCount = CType(vars("RecordCount").Value, Integer)
            ' rdate = CType(vars("CurentDate").Value, Date)
            vars.Unlock()
            Me.VariableDispenser.LockOneForRead("CurrentDate", vars)
            rdate = CType(vars("CurrrentDate").Value, Date)
            ' rdate = CType(vars("CurentDate").Value, Date)
            vars.Unlock()
            'Me.VariableDispenser.LockOneForRead("rcount", vars)
            'rcount = CType(vars("rcount").Value, Integer)
            'vars.Unlock()
            '  rcount = rcount + 1
            'Output one row with record count
            Output0Buffer.AddRow()
            Output0Buffer.FooterRow = String.Format("ABC" & recordCount & rdate)
            Output0Buffer.SetEndOfRowset()
    in SSIS i have declare CurrentDate in datetime and i need to use it here , but i am getting error.
    how to append its value to       Output0Buffer.FooterRow = String.Format("ABC" & recordCount & rdate)
    its in vb ,i dotn know anything about VB ,please help me.
    i havent put anything in  readonly,readwrite in script task.ecordCount is working but i did same  for rdate and its not working

    how to get that value in yyyymmddhhmmss format in ssis.
    whats expression i need to use.
    also how to give single  space here between recordcount and variables.rdate
    Output0Buffer.FooterRow = String.Format("ABC" & recordCount & Variables.rdate)

  • [SOLVED] How to add data toOutputStream ?

    <p>
    I have following code in managed bean:
    </p>
    <p>
    <font face="courier new,courier" size="2" color="#0000ff">OutputStream out = response.getOutputStream();
    response.setHeader("Content-Disposition", "attachment;filename=\"test.xml\"");
    response.setContentType("application/xml");</font>
    </p>
    <p>
    <font face="courier new,courier" size="2" color="#0000ff">........</font>
    </p>
    <p>
    <font face="courier new,courier" size="2" color="#0000ff">out.flush();
    out.close();
    ctx.responseComplete();</font>
    </p>
    <p>
    How can I add data (i get it from iterator) to OutputStream to send user xml file. ?
    </p>
    <p>
    Kuba
    </p>

    <p>
    Hi Steve,
    </p>
    <p>
    I found solution, I mean this:
    </p>
    <p>
    <font face="courier new,courier" size="2" color="#0000ff">ExternalContext ectx = ctx.getExternalContext();
    HttpServletResponse response = (HttpServletResponse)ectx.getResponse();
    OutputStream out = response.getOutputStream();
    response.setHeader(&quot;Content-Disposition&quot;, &quot;attachment;filename=\&quot;test.xfdf\&quot;&quot;);
    response.setContentType(&quot;vnd.adobe.xfdf&quot;);
        PrintWriter pw = new PrintWriter(out);
        pw.println(&quot;<font color="#ff0000"><em>ANY DATA HERE</em></font>&quot;);
        pw.close();
    out.flush();
    out.close();
    ctx.responseComplete();</font>
    </p>
    <p>
    Kuba
    </p>

  • How to add data into a List box

    CS3 SDk:Windows<br /><br />Hi all,<br />I am trying to add  data into a basic List box in CS3??<br /><br />// .fr<br />GenericPanelWidget<br />     (<br />     // CControlView properties<br />     kInvalidWidgetID, // widget ID<br />     kPMRsrcID_None, // PMRsrc ID<br />     kBindNone, // frame binding<br />     Frame(0,0,250,90) // left, top, right, bottom<br />     kTrue, // visible<br />     kTrue, // enabled<br />     // GroupPanelAttributes properties<br />     "", // header widget ID<br />     { <br />     <br />     WidgetListBoxWidgetN<br />     (<br />     kWFPListBoxWidgetID, kSysListBoxPMRsrcId, // WidgetId,RsrcId<br />     kBindAll, // Frame binding<br />     Frame(0,0,250,90) // Frame<br />     kTrue, kTrue, // Visible, Enabled<br />     1,0, // List dimensions<br />     19, // Cell height<br />     1, // Border width<br />     kFalse,kTrue, // Has scroll bar (h,v)<br />     kTrue, // Multiselection<br />     kTrue, // List items can be reordered<br />     kTrue, // Draggable to new/delete buttons<br />     kFalse, // Drag/Dropable to other windows<br />     kTrue, // An item always has to be selected<br />     kFalse,// Don't notify on reselect<br />     kFalse, <br />     {               <br />     }     <br />                    <br />),<br />},<br />),<br /><br />//-------ID.h--------<br />DECLARE_PMID(kWidgetIDSpace, kWFPListBoxWidgetID, kWFPPrefix + 2)<br /><br />//observer.cpp-----------WFPDialogObserver::Update<br /><br />//get currently selected/active widget <br />WidgetID theSelectedWidget = controlView->GetWidgetID();<br /><br />// ist it the text edit field? <br />if (theSelectedWidget == kWFPInsertButtonWidgetID && theChange == kTrueStateMessage) <br />{ <br /><br />IControlView* listBox = panelControlData->FindWidget(kWFPListBoxWidgetID);<br /><br />InterfacePtr<IListControlData> listControlData(listBox, UseDefaultIID()); <br /><br />//Insert the string into listbox <br />PMString strText = dialogCtrl->GetTextControlData(kWFPTextEditBoxWidgetID); <br /><br />// obviously there can't be a translation for text entered by user <br />strText.SetTranslatable(kFalse);<br />listControlData->Add(strText,kWFPTextEditBoxWidgetID); <br />dialogCtrl->SetTextControlData(kWFPTextEditBoxWidgetID, ""); <br />break;      <br /><br />I am not able to Add items into list box.<br /><br />I tried based on Discussion <br />http://www.adobeforums.com/webx/.3bc43877<br /><br />but not able to locate  SDKListBoxHelper file .it is not available in SDK.<br /><br />Please ,<br />Tell me Where I am going wrong.<br /><br />Thanks,<br />Adil

    resource VSPDialogWidget (kSDKDefDialogResourceID + index_enUS)
         __FILE__,
         __LINE__,
         kVSPDialogWidgetID, // WidgetID
         kPMRsrcID_None, // RsrcID
         kBindNone, // Binding
         Frame(5,0,491,266) // Frame (l,t,r,b)
         kTrue,
         kTrue, // Visible, Enabled
         kVSPDialogTitleKey, // Dialog name
              DefaultButtonWidget
                   kOKButtonWidgetID, // WidgetID
                   kSysButtonPMRsrcId, // RsrcID
                   kBindNone, // Binding
                   Frame(9,234,89,254) // Frame (l,t,r,b)
                   kTrue,
                   kTrue, // Visible, Enabled
                   kSDKDefOKButtonApplicationKey,  // Button text
              CancelButtonWidget
                   kCancelButton_WidgetID, // WidgetID
                   kSysButtonPMRsrcId, // RsrcID
                   kBindNone, // Binding
                   Frame(394,234,474,254) // Frame (l,t,r,b)
                   kTrue,
                   kTrue, // Visible, Enabled
                   kSDKDefCancelButtonApplicationKey, // Button name
                   kTrue,  // Change to Reset on option-click.
              WLBCmpListBox   //Tree view
                   kWLBCmpListBoxWidgetID, kPMRsrcID_None,     // WidgetId, RsrcId
                   kBindAll,                                                       // Frame binding
                   Frame(299,49,475,170)           // Frame
                   kTrue, kTrue,                                             // Visible, Enabled
                   kTrue,                               // EraseBeforeDraw
                   kInterfacePaletteFill,           // InterfaceColor
                   kHideRootNode | kDrawEndLine,     // Options. Display root node
                   kFalse,          // Use H Scroll bar
                   kTrue,          // Use V scroll bar
                   20,               // fVScrollButtonIncrement
                   20,               // fVThumbScrollIncrement
                   0,               // fHScrollButtonIncrement
                   0,               // fHThumbScrollIncrement
                   2,               // Items selectable, 0 = No Selection, 1 = Single Selection, 2 = Multiple Selection
                   kFalse,          // Allow children from multiple parents to be selected
                   kTrue,          // Allow discontiguous selection
                        //The tree view is dynamically created.          
    // added to support the list elements in the list box
    resource LocaleIndex (kWLBCmpListElementRsrcID)
         kViewRsrcType,
              kWildFS, k_Wild, kWLBCmpListElementRsrcID + index_enUS
    resource WLBCmpNodeWidget (kWLBCmpListElementRsrcID + index_enUS)
         __FILE__, __LINE__,
         kWLBCmpListParentWidgetId, kPMRsrcID_None,     // WidgetId, RsrcId
         kBindLeft | kBindRight,               // Frame binding
         Frame(0, 0, 194, 20),               // Frame
         kTrue, kTrue,                         // Visible, Enabled
         "",                                        // Panel name
                   // Just a info-static text widget with about-box text view to get white bg.
              WLBCmpTextWidget
                   kWLBCmpTextWidgetID, kPMRsrcID_None,          // WidgetId, RsrcId
                   kBindLeft | kBindRight,                                        // Frame binding
                   Frame(45,1,194,18)                                             // Frame
                   kTrue, kTrue, kAlignLeft,kEllipsizeEnd                    // Visible, Enabled, Ellipsize style
                   "",                                                                 // Initial text
                   0,                                                                 // Associated widget for focus
                   kPaletteWindowSystemScriptFontId,                         // default font
                   kPaletteWindowSystemScriptHiliteFontId,                    // for highlight state.
    If you still got problems, post you email here - I'll send you the complete project/code then.
    -Marc

  • How to add data through matrix from sales order row level to

    user defined document type table ...
    i created matrix in user defined form, i placed one edit text box on that form
    when i entered docnum of sales order the data of sales order row level should have to
    upload to matrix , after fill up the some data in matrix that data should have to add to the user defined document type table
                                any one have code pls post it
                                            thanq

    Hi rajeshwar
    Here is a sample function related to ur senario. just check it out and use the concepts.
    Here I have used a CFL to get the itemcode and I have used a query to  add data to matrix.
    This is a function used.
    Private Sub AddValuesInMatrix(ByRef name As String)
            Try
                'Dim quantemp As Double
                oForm = SBO_Application.Forms.Item("itemdts")
                oMatrix = oForm.Items.Item("matrix").Specific
                Dim rs As SAPbobsCOM.Recordset = ocompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
                '//gitemdesc = "SELECT T0.[ItemName] FROM OITM T0 WHERE T0.[ItemCode] ='" & name & "'"
                oMatrix.Clear()
                rs.DoQuery("SELECT T0.[DocEntry], T0.[ItemCode], T0.[Dscription], T0.[Quantity], T0.[Price], T0.[TaxCode] FROM dbo.[POR1] T0 WHERE T0.[ItemCode] ='" & name & "'")
                rscount = rs.RecordCount
                If (rscount < 1) Then
                    SBO_Application.StatusBar.SetText("No Items Found", SAPbouiCOM.BoMessageTime.bmt_Short)
                Else
                    oForm.Freeze(True)
                    ITE = True
                    For i As Integer = 1 To rs.RecordCount
                        oMatrix.AddRow()
                        oMatrix.Columns.Item("V_5").Cells.Item(i).Specific.Value = rs.Fields.Item("DocEntry").Value
                        oMatrix.Columns.Item("V_4").Cells.Item(i).Specific.Value = rs.Fields.Item("ItemCode").Value
                        oMatrix.Columns.Item("V_3").Cells.Item(i).Specific.Value = rs.Fields.Item("Dscription").Value
                        oMatrix.Columns.Item("V_2").Cells.Item(i).Specific.Value = rs.Fields.Item("Quantity").Value
                        'quansum = quansum + rs.Fields.Item("Quantity").Value
                        oMatrix.Columns.Item("V_1").Cells.Item(i).Specific.Value = rs.Fields.Item("Price").Value
                        'pricesum = pricesum + rs.Fields.Item("Price").Value
                        oMatrix.Columns.Item("V_0").Cells.Item(i).Specific.Value = rs.Fields.Item("TaxCode").Value
                        SBO_Application.SetStatusBarMessage("Data Loading In Progress Please Wait.....>>> " & i & " / " & rs.RecordCount, SAPbouiCOM.BoMessageTime.bmt_Short, False)
                        rs.MoveNext()
                    Next
                    ITE = False
                    oMatrix.AutoResizeColumns()
                    SBO_Application.StatusBar.SetText("Data Loading Completed", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Success)
                    oForm.Freeze(False)
                    oForm.Refresh()
                End If
            Catch ex As Exception
                SBO_Application.MessageBox("Matrix Load Function : " & ex.Message)
                ITE = False
            End Try
        End Sub
    -Anto

  • How to add data in IT 184 through portal.

    Hi Experts,
    I want to add data in IT 184 .
    I am adding the project description of an employee in this IT type.
    I will provide the link on portal to add the data in this infotype by it is not possible for me to update the data.
    Please guide me.
    Thanks in Advance.
    Ashish

    Hi,
    Are you implementing it in Singapore.
    I think this Infotype is specific for Singapore.
    Check in Table T582L.
    Please reward points.
    Regards
    Venu

  • How to Add data in HR infotype 2011 through ABAP

    Hi All,
    Can any one please give me an idea about how to insert time record in Infotype 2011 through ABAP. I cannot use the front end recording (SHDB) as it locks the person's master data. I need to Add the record through ABAP Query. I have inserted record in Table TEven and it works fine but then there is a conflict of sequence number field and system does not allow to change the data in infotype 2011 and gives error message.
    Thanks

    Hi amit
           even i have same requirement i tried with the same code but i'm getting error No data stored for infotype 2011 in the period.
    code:
       CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
            EXPORTING
              number        = wa_modify-pernr
           IMPORTING
             RETURN        = return
          clear return.
          CALL FUNCTION 'HR_INFOTYPE_OPERATION'
            EXPORTING
              infty                  = p_infty
              number                 = wa_modify-pernr
    *         SUBTYPE                =
    *         OBJECTID               =
    *         LOCKINDICATOR          =
    *         VALIDITYEND            = wa_modify-ldate
    *         VALIDITYBEGIN          =
    *         RECORDNUMBER           =
              record                 = wa_modify
              operation              = 'MOD'
             TCLAS                   = 'A'
             DIALOG_MODE             = '0'
    *         NOCOMMIT               =
    *         VIEW_IDENTIFIER        =
    *         SECONDARY_RECORD       =
           IMPORTING
             RETURN                 = return
    *         KEY                    =
          CALL FUNCTION 'HR_EMPLOYEE_DEQUEUE'
            EXPORTING
              number        = wa_modify-pernr
    *       IMPORTING
    *         RETURN        =

  • How to add date with specified number of years?

    Given a date 2005-3-28.
    How do i get the date of the given above date plus 25 years?
    Please advise.
    Thank you.

    Calendar cal = Calendar.getInstance();  // Current date
    // Do something to set the given date.
    cal.add(Calendar.YEAR, 25);

Maybe you are looking for

  • Manually transport BP to ERP

    Hi What is the T.Code for sending BP's manually, if queues fail? and what is the process? how to do it? Reward with Full Points, minimum info is OK. Message was edited by:         CRMUSER77

  • How to rename files in OS X SL, from 2 similar sets of picts?

    Hello, I have 2 sets to files that are different but carry the same file name, e.g. "PICT_001...PICT050" twice. In Finder, I'm looking for a way to select all pictures from one set and rename all at once, e.g. "PICT_051...PICT100" at once. Please hel

  • How to solve :  java.lang.OutOfMemoryError: Java heap space

    Dear all, Am using Jdeveloper 11.1.1.3 with weblogic10... I keep getting out of memory error while working on the application , here is the exact error message that i copied from the server log : ####<28/11/2010 GMT 09:17:58 ص> <Critical> <Health> <j

  • Will a dead spot reduce the value of my iphone 3gs

    right seen as in a month or two the new iphone 5 is coming out i will decide to sell my phone on ebay around september. i have had a little dead strip at the  very top of the screen which it only seems to effect the top search bar on safari. you can

  • Cross Platform Swap/upgrade CS5

    I have had the Windows version of Photoshop CS5 for about 3 years. Tomorrow I am getting my first Mac (woo!).  I was just told via an auto-reply email from Adobe that my case was closed because I have to upgrade to CS6 first (on my almost retired PC?