XSLT Mapping: how to add one day to TimeStamp

Hello Experts,
My requirement is to add one day to current timestamp. Used $TimeSent to get the currenttimestamp. In Expired field, the need to add one day
say Created= 2011-03-30T20:29:13Z
       Expired = 2011-03-31T20:29:13Z
     <xsl:param name="TimeSent"/>
     <created><xsl:value-of select="$TimeSent"/></created>
     <expired>2011-03-31T20:29:13Z</expired>
How to add one day to the current timestamp. I am new to XSLT mapping and need some help with the code.
Thanks
Shikha Jain
Edited by: Jain Shikha on Mar 30, 2011 8:34 PM
Edited by: Jain Shikha on Mar 30, 2011 8:36 PM

Hello All,
Thanks for your reply. i tried the function and the code is working when i am testing in stylus studio. But the same code gives error when i  tested the xslt mapping in PI (Error: TransformerConfigurationException triggered while loading XSLT mapping).
$TimeSent function is working when code is tested in PI , but it doesnot give value in stylus studio. Also Current-dateTime() function is doesnot give value in PI but works in stylus studio. Is there any difference in the functions used in stylus studio and XSLT mapping in PI?
Also if i remove the code used for function(to add one day to timestamp), and use constant value(2011-04-02T23:24:56.763Z)the code is working fine in PI. Please help me to find out where the code is going wrong when tested in PI.
Below is the XSLT code i am using
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ds="http://xsltsl.org/date-time" xmlns:functx="http://www.functx.com" xmlns:xs="http://www.w3.org/2001/XMLSchema">
   <xsl:function name="functx:next-day" as="xs:date?">
      <xsl:param name="TimeSent" as="xs:anyAtomicType?"/>
      <xsl:sequence select="xs:date(current-date()) + xs:dayTimeDuration(&apos;P1D&apos;) "/>
   </xsl:function> 
<xsl:template match="/">
      <xsl:param name="TimeSent"/>
      <soapenv:Envelope xmlns:olsa="http://www.skillsoft.com/services/olsa_v1_0/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
         <soapenv:Header>
            <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
               <wsu:Timestamp wsu:Id="Timestamp-191900" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
        <wsu:Created>
                     <xsl:value-of select="$TimeSent"/>
           </wsu:Created>
<wsu:Expires>
     <xsl:value-of select="concat(substring(functx:next-day($TimeSent) ,1,10) ,&apos;T&apos;, current-time())"/>                  </wsu:Expires>
               </wsu:Timestamp>
               <wsse:UsernameToken wsu:Id="UsernameToken-19030197" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
                  <wsse:Username>ABC</wsse:Username>
                  <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">XYZ</wsse:Password>
                  <wsse:Nonce>erDTBNoUWv7GdHDaErrLwA==</wsse:Nonce>
                  <wsu:Created>2011-02-15T23:24:56.763Z</wsu:Created>
               </wsse:UsernameToken>
            </wsse:Security>
         </soapenv:Header>
         <soapenv:Body>
            <olsa:GetMultiActionSignOnUrlRequest>
               <olsa:customerId>ABC</olsa:customerId>
               <olsa:userName>XYZ</olsa:userName>
               <olsa:actionType>launch</olsa:actionType>
               <olsa:assetId>222499_eng</olsa:assetId>
               <olsa:groupCode>testgrp</olsa:groupCode>
            </olsa:GetMultiActionSignOnUrlRequest>
         </soapenv:Body>
      </soapenv:Envelope>
   </xsl:template>
</xsl:stylesheet>
Thanks
Shikha Jain
Edited by: Jain Shikha on Apr 2, 2011 9:51 PM

Similar Messages

  • How to add one day to a Date?

    Hi,
    What is the simplest way to daa one day to a Date object?
    Thanks.
    Pengyou

    You use a database query just to add one day
    to a Date object? I wouldn't call that the "simplest"
    way at all.I was going to suggest firing off an email to the naval observatory and having them carry out the calculation, emailing the result back (maybe using JMS, not sure - web service possibly?) but the OP's way is simpler.

  • Add one day to a binding

    Hi all,
    I assume this is a very dumb question... How can I add one day to a date that is like this :
    #{bindings.ChooseDateCrah.inputValue}
    It's a binding in a the header text property of a column.
    That : #{bindings.ChooseDateCrah.inputValue + 1} or that : #{bindings.ChooseDateCrah.inputValue} +1 does not work.
    Thanks.
    Frédéric.

    Hi Frédéric,
    Yeah, you cannot apply a converter on the headerText attribute of a column. However, you can instead place an outputText in the header facet of the column, then the converter option still works.
    As for the code, no, in the RowImpl object in the getter method of your calculated attribute. (That method is quite complicated for a read only value though).
    You can check my reply at Re: How to access menbers of the current row of an af:table component? as for how to create a custom converter. In your specific case, however, you would have to extends DateTimeConverter and decorate the getAsObject and getAsString methods in order to add one day before calling super.getAsString and remove one day from the returned value of super.getAsObject before returning to ensure reversibility.
    A managed bean solution would imply the use of the implements Map EL hack which is both easy and hard, depending on your experience level with JSF and EL.
    Regards,
    ~ Simon

  • 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;

  • Add one day to java.sql.date

    I ask user to enter a date: yyyy-mm-dd, then I want to add one day to that date, I don't know how to do it?
    java.sql.Date time2 = java.sql.Date.valueOf( args[0] );
    Many Thanks.

    since a date object is really nothing more than a long you can always add one day's worth of milliseconds to it....
    long milliInADay = 1000 * 60 * 60 * 24;
    Date d = ......
    d.setTime(d.getTime() + milliInADay);although there may be some issues with this i'm unaware of, but seems pretty straightforward to me.

  • How to add one more field to an exist internal table

    hi abapers
    i am a very new abap programmer and just started learning it.
    i want to know How to add one more field to an exist internal table.
    lemme me put my question in a very simple way.
    i have a internal table having fields f1,f2,f3 and which also that internal also contains some data.
    now i want to add two more fields (mm & nn) to that internal table now.
    how can i do that.
    and i wanna know the websites names where i can find some brain teasing questions in abap programming.
    eagerly waiting for ur reply
    regards,
    Maqsood A Khan

    Hi, MAQSOOD.
    You can insert more fields in your internal table like this.
    refer this code snippet.
    DATA : BEGIN OF tbl_itab OCCURS 0.
            INCLUDE STRUCTURE zsdtc009.
    DATA :  vkorg   LIKE vbak-vkorg,  "inserted one
            vtweg   LIKE vbak-vtweg,  "inserted one
            vkbur   LIKE vbak-vkbur,  "inserted one
            vkgrp   LIKE vbak-vkgrp,  "inserted one
           END OF tbl_itab.
    you can also read the book "Teach yourself abap in 21 days"
    at http://cma.zdnet.com/book/abap/
    but that book is just about basic concept of abap and report program.
    it doesn't give a lecture for on-line program.
    you can get pdf version books(about abap, sap...things) from sap.
    http://help.sap.com/printdocu/core/Print46c/en/Data/htm/english.htm
    I wish I could help you.
    Regards
    Kyung Woo.

  • How to add one date column and charecter column

    hi all,
    i have 3 column start_date(date),end_date( date),duration (varchar2)
    i am trying to add start_time and duration like this
    end_date := to_char(start_time) + duration;
    but its showing value_error
    how to add one date column and charecter column.
    Thanks

    you need something that does:
    end_date (DATE) := start_date (DATE) + <number of
    days> (NUMBER)Not necessarily, because if the duration is just a string representation of a number then it will be implicitly converted to a number and not cause an error
    e.g.
    SQL> ed
    Wrote file afiedt.buf
      1  with t as (select to_date('01/07/2007','DD/MM/YYYY') as start_dt, '3' as duration_days from dual)
      2  -- END OF TEST DATA
      3  select start_dt + duration_days
      4* from t
    SQL> /
    START_DT+
    04-JUL-07

  • 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

  • How we add Grace days to net due date

    Hi,
    How we add grace days (eg one week) to net due date? This is only for particular customers.
    Regards,
    Shaik

    Hi Azeen
    Try this way. I assume that you want to know how much is due from customers as on a particular future date, that should come between today and that date. For preparing the liquidity forecast for the month, I use the following method for estimating the recoveries from the Customers and payments to Vendors and it works quite well for me.
    Let's say for Customers you want to forecast the collections that would come in the month of Jan from today until 31 Jan'09. Use the FBL5N Report, using the 'Open Item Key Date' as a future date, in our example - 31 Jan'09. Change the layout of the report by including the feilds 'Net Due Date' and 'Arrears after Net Due Date'. Sort the report on the Document Date, this being the baseline date. Now in the 'Arrears after Net Due Date' you will find the overdue days, which would be equal to the difference between the Date of the Report (31 Jan'09) and the Net Due Date of the Open Item. Thereafter, use the filter for 'Arrears after net due date' and click on the icon for 'multiple values'. Exclude the range of days, by assigning the lower and the upper limits. Lower Limit will be in minus, for those invoices that would still not be due upto 31 Jan'09 and the upper limit will be 7, since you would be granting a grace period of one week and consider all those invoices as not due upto 31 Jan. Once the filter is set, the report will exclude the open items as per the filter and provide you with a fairly accurate estimate of collections for the period/month.
    Let me know if it works for you.
    Regards

  • Can anyone help with associate my new iPhone with iTunes? My other old devices are there, but I see only how to delete one, not how to add one.  Thank you.

    Can anyone help with associate my new iPhone with iTunes? My other old devices are there, but I see only how to delete one, not how to add one.  Thank you.

    iTunes Match is a subscription system that allows you to upload your own music (e.g. coped from CDs) to the cloud so that it shows (in the cloud) on your devices and computers without having to sync/copy it.
    Automatic downloads allows to, for example, buy an app on your computer's iTunes and have it automatically download on your phone without having to connect and sync it or go to the Purchased tab in the App Store app on your download and download it yourself - but doing that, going to the Purchased tab and redownloading an app, should get it associated.
    But no, I'm not aware of any problems that not having it associated causes.

  • How to add one more values in Search Criteria,

    Hi All,
    OAF page Search Criteria :
    Search By "name"only Available already have in the search criteria .we are need to add Description in search criteria .How to add one more filed “Description” in Search Criteria,
    Please Help Me
    Thanks
    Rajavel

    "Set the Search Allowed property to True for any LOV result items you want to present to the user as searchable values. These items are listed in the search poplist the user sees in the LOV window.
    At a minimum you must set the Search Allowed property to True for the the result table item corresponding to the LOV field on the base page.
    This is from the devguide, I suggest you read it once at least if you have started work on the framework.
    Tapash

  • How to add one new tab at item label in me21n

    hi experts,
    i  am very new in badi .can any one please tell me how to add
    one tab in me21n at item label. i already checked  sample code for
    badi me_gui_po_cust. i create one implementation and write same code.
    this code is coming in debugging mode but cant see that tab while executing 
    me21n.
    please help me out.
    thanks in advance
    manasi

    Hi Manasi,
    acording to me you are on the right path.Some help
    1.ME_GUI_PO_CUST.
    For Creating Customer own Screen - Purchase Order..
    Details :
    Go to the sample code of this BADI.
    For this create a Function group with the screen that u want in PO.
    In the First method u want to append the screen . There is one parameter im_element.
    In this parameter u can mention that in which part u want the screen .Header/Item.
    2. ME_PROCESS_PO_CUST
    In this BADI u can Check the Complete PO at various Level.
    ie Header Level ,Item Level, At the time of Save, Post .
    Now Create a Include in your Function group and paste the below code.
    DATA: call_subscreen TYPE sy-dynnr, "#EC NEEDED
    call_prog TYPE sy-repid, "#EC NEEDED
    call_view TYPE REF TO cl_screen_view_mm, "#EC NEEDED
    call_view_stack TYPE REF TO cl_screen_view_mm OCCURS 0, "#EC NEEDED
    global_framework TYPE REF TO cl_framework_mm, "#EC NEEDED
    global_help_view TYPE REF TO cl_screen_view_mm, "#EC NEEDED
    global_help_prog TYPE sy-repid. "#EC NEEDED
    FORM SET_SUBSCREEN_AND_PROG *
    --> DYNNR *
    --> PROG *
    --> VIEW *
    --> TO *
    --> CL_SCREEN_VIEW_MM *
    FORM set_subscreen_and_prog USING dynnr TYPE sy-dynnr
    prog TYPE sy-repid
    view TYPE REF TO cl_screen_view_mm.
    call_subscreen = dynnr.
    call_prog = prog.
    call_view = view.
    ENDFORM. "set_subscreen_and_prog
    Hope to solve ur probs.....
    Regards
    Renu

  • Add one day to current date

    Hi ,
    can anyone tell me the logic for add one day to sysdate()?
    Thanks and Regards,
    Ranjith.

    Hi Ranjith K,
    you can use sysdate()+1 to increment the system date.
    I hope this will help you out.
    Regards,
    Akhileshkiran.

  • How to add one form to specific responsibility

    Hi ,
    I need help from you guys regarding how to add one form to specific responsibility,having sysadmin responsibility i can able to view that form name but don't have idea how to include the form to that particular responsibility.
    Much appreciated for your help
    Thanks,
    Babu

    1. Query the responsibility name (from Security > Responsibility > Define) and get the menu
    2. Navigate to Application > Menu, and query the menu you got from the previous step
    3. Add the form to the menu
    Thanks,
    Hussein

  • How to add one tabstrip to standard transation

    Hi Guy's,
    Please help me how to add one tabstrip to standard tranasation it is urgent.
    Thanks and Regards,
    Sai.

    Hi,
    Search any user exits or badi's for the standard one.
    So that u can place ur tab strip there.
    Regards,
    Angi

Maybe you are looking for

  • Can somebody help me with drop down box in STRUTS?

    Hi GURUs: I am doing a drop down box with Struts, and I have seen previous post on the forum regarding how to do that. Basically I have 2 classes InquiryAction and InquiryResult.jsp here is the code snippet from InquriyAction public class InquiryActi

  • Input Simplified Chinese Characters into Microsoft Powerpoint

    Please help! What's the easiest way to put Simplified Chinese Characters into Microsoft Powerpoint??? I have a mandarin project due like in a week, and I've been trying to find out how to do this on a mac. I've tried the international thing on prefer

  • Client Copy between Two Different Systems

    Hi!! Could someone please explain or provide any documentation which explains how to perform client copy between two r/3 systems of same version(ecc 6.0) Thanks and Regards, Vishwa.

  • UWL Substitution Changes

    Hi, I am working on portal version EP7 SP 10. We can navigate to Create Substituion Rule screen by UWL iView -> select Manage substitution -> Click on create Rule button. I need to incorporate following changes in this Screen(view): 1) Changes in "As

  • Ibook g4 running 10.4.11 will not find my iphone ?

    I have just bought this ibook g4 running 10.4.11 but i cant download latest version of itunes and the itunes what is on it will not conect to my phone well saying that i did get it to conect once but it would not let me do anything i have read that i