Xp20:format-dateTime: How to use it

Hi
Can you tell me how to use this XPath function?? Give me an example please.
I tried xp20:format-dateTime(xp20:current-dateTime(),'ddMMyyyy HHmm') but the result is
"ddMMyyyy HHmm" (yes, the pattern itself!)
Thanks
Marcelo Menezes

I don't know what the problem could be of this.
xp20:current-dateTime() function returning time 1 hour ahead
in this threads the guys are having the same problem (only different date function)

Similar Messages

  • HOW TO GENARATE DATE LIKE 12 DEC 2007 USING xp20:format-dateTime(dateTime a

    HOW TO GENARATE DATE LIKE 12 DEC 2007 USING xp20:format-dateTime(dateTime as string, format as string). PLEASE HELP.

    If i look at the w3 org i would say :
    xp20:format-dateTime('yourfield','[D]-[[MN,*-3]-[Y]')
    or just MN will do too.

  • Xp20:format-datetime usage....

    Hello gurus,
    I am trying to use the xPath function format-datetime to get rid of the timezone from an input element, but in the output factional seconds is returning all zeroes. My picture string looks like below.
    xp20:format-dateTime($CreationDateTime,"[Y0001]-[M01]-[D01]T[H01]:[m01]:[s01].[f000001]")
    eg: Input: 2011-01-07T09:35:03.624992-05:00
    Output: 2011-01-07T09:35:03.000000
    I am using 10.1.3.4 SOA and jdeveloper version.
    Any help is highly appreciated.
    Thanks in advance.
    Fub

    How do I set this though to format the date itself? i.e. I have set this up so far, xpath20:format-dateTime(xpath20:current-dateTime()), but what do I place in the last set of parenthesis that allows me to achieve this?

  • Xp20:format-dateTime with milli seconds always as zeroes

    Hi All,
    I am trying to use the xPath function format-datetime , but in the output factional seconds is returning all zeroes. My picture string looks like below.
    *xp20:format-dateTime(xp20:current-dateTime(),"[H01][m01][s01][f001]*
    Result always in zeroes see example below:
    *105017000*
    Do somebody have some advice on this issue?

    Use ora:getCurrentDateTime() extension function instead... It accepts java SimpleDateFormat patterns and it is able to go milliseconds...
    Cheers,
    Vlad

  • Xp20:format-dateTime('060111','[Y01][M01][D01]') returns null...

    As part of my tranformation I need to convert a date string into a datetime type. This operation kept returning null so I decided to hard code the value and the result is still null. Can anyone provide any insight?
    XSL TRANFORMATION:
    <order:OrderHdrAction>
    <xsl:text disable-output-escaping="no">ADD
    </xsl:text>
    </order:OrderHdrAction>
    <order:OrderHdrReqdt>
    <xsl:value-of select="xp20:format-dateTime('060111','[Y01][M01][D01]')"/>
    </order:OrderHdrReqdt>
    <order:OrderHdrPonum>
    <xsl:value-of select="/client:adage_orderentry_qdb_processorProcessRequest/client:flat_order/imp1:instruction/imp1:po_num"/>
    </order:OrderHdrPonum>
    RESULTANT XML:
    <order:OrderHdrAction xmlns:order="http://www.shamrockfoods.com/adage/orderentry">ADD</order:OrderHdrAction>
    <order:OrderHdrReqdt xmlns:order="http://www.shamrockfoods.com/adage/orderentry" />
    <order:OrderHdrPonum xmlns:order="http://www.shamrockfoods.com/adage/orderentry">00001234</order:OrderHdrPonum>

    i think this function is for formatting dates, and not parsing them as you are attempting. Try using substring instead.

  • Xp20:format-dateTime method in BPEL 11g

    I am doing a date conversion as xp20:format-dateTime('2007-10-07','YYYYMMDD') and storing in a String variable - givenDateConverted
    but the result is as below
    <givenDateConverted >YYYYMMDD</givenDateConverted>
    My original requirement is to compare this givenDateConverted with the currentDate and reject if givenDateConverted is less than currentDate
    Please help
    Thanks
    Sesha

    Hi sesha,
    Your date 08-OCT-2009 is not in the expected xs:DateTime format like 2002-05-30T09:30:10Z
    This is what xp20:format-dateTime needs.
    What is the date format of the date you need to compare to the current date?
    If it is in the standard xsd:dateTime format you don't need to format anything.
    If it is a comparable format you can format the current time in that format.
    For example:
    <before>      
      <xsl:value-of select="xp20:format-dateTime(xp20:current-dateTime(),"[Y0001][M01][D01][H01][m01][s01]") > '20100909111209'"/>
    </before>see http://www.w3.org/TR/xslt20/#function-format-dateTime
    And beware of timezone issues...
    Groeten,
    HJH

  • Format-dateTime usage question

    Have a string input of 2007-10-10T10:10:10 am am attempting to use the format-dateTime XPath function in the XSLT Mapper to format the string uisng the string 'YYYY-MM-DDThh:mm:ss.SSS' - my output is simply the fomat string: 'YYYY-MM-DDThh:mm:ss.SSS'.
    Have looked at several threads on this but cannot find any help - what is going on and how do I use this function?
    Thanks - Casey

    Hopefully by now Casey has figured it out but in case someone else finds this thread...
    The date format used by the format-dateTime BPEL / ESB XPath extension function seems to be the same format string syntax specified in XSLT 2.0 format-date() function which is detailed with examples at: http://www.w3.org/TR/2005/WD-xslt20-20050915/#date-time-examples
    An example appears in this thread:
    Re: xp20:format-dateTime: How to use it

  • Add-dayTimeDuration-to-dateTime not working just before format-dateTime

    Hi,
    I am using format-DateTime function just after add-dayTimeDuration-to-dateTime function in XSLT mapping.
    But the response coming doesnot providing the result of add-dayTimeDuration-to-dateTime function.
    When I use both the functions individually then both works fine.
    Please let me know any solution for this.
    Thanks

    Hi Arpit,
    Can you try converting the output of add-dayTimeDuration-to-dateTime to string, before passing it to format-DateTime.
    Also can you post your piece of xslt that you are trying to work out with an example.
    Please do mention what exactly you are trying to do.
    I have tried this and its working fine.
    <xsl:value-of select="xp20:format-dateTime(string(xp20:add-dayTimeDuration-to-dateTime(xp20:current-dateTime(),'PT15S')),'[D01]/[M01]/[Y0001]')"/>
    Please let me know if this helps.
    Thanks,
    Deepak.

  • XPath format-dateTime

    Hi,
    New in XPath.
    xp20:format-dateTime(string(2005-01-04)) <= xp20:format-dateTime(string(2005-01-05))
    This should be true, but it evaluation results false.
    What I´m doing wrong?
    Thanx

    You can use this functions as follows:
    <client:input>
    <xsl:value-of select="xp20:format-dateTime(/client:Sensors_JQProcessRequest/client:input,'[MM] [YYYY] [DD]')"/>
    </client:input>
    With input as - <input>2005-06-09T15:30:44.369</input>, you will get the output as <client:input>6 2005 9</client:input>
    But i dont think you can use this function for comparision, neither we have any xpath function for comparing datetime. You need to either write your own custom xpath function or you can use exec activity, write java code in that or use xp20:day-from-dateTime(), xp20:hours-from-dateTime(), xp20:year-from-dateTime(), xp20:minutes-from-dateTime(), xp20:seconds-from-dateTime() and compare them separately

  • Transformation: format-dateTime

    Hi,
    I am stuck with transformation. I am trying to map a string column to a date column.
    Column name: imdtsc (String datatype)
    Value: 20080624054923
    For converting this string and for mapping to destination date field, I have used this function:
    <ns2:trxDate>
    <xsl:value-of select='xp20:format-dateTime(/top:F59432001Collection/top:F59432001/top:imdtsc,"[Y0001]-[M01]-[D01] [H01]:[m01]:[s01].0")'/>
    </ns2:trxDate>
    Here trxDate is my destination field of Date datatype.
    After deploying and instance creation I am not able to see any value in the table column trxDate.
    Can anyone help me in this. Am I doing something wrong. Is there any other way?
    Thanks,
    Abhishek...

    Thanks Anne for replying.
    I got the solution for my problem. Thanks to ramana.
    Here is my piece of code for this:
    <ns2:trxDate>
    <xsl:value-of select="concat(substring(/top:F59432001Collection/top:F59432001/top:imdtsc,1.0,4.0),&quot;-&quot;,substring(/top:F59432001Collection/top:F59432001/top:imdtsc,5.0,2.0),&quot;-&quot;,substring(/top:F59432001Collection/top:F59432001/top:imdtsc,7.0,2.0),'T',substring(/top:F59432001Collection/top:F59432001/top:imdtsc,9.0,2.0),&quot;:&quot;,substring(/top:F59432001Collection/top:F59432001/top:imdtsc,11.0,2.0),&quot;:&quot;,substring(/top:F59432001Collection/top:F59432001/top:imdtsc,13.0,2.0))"/>
    </ns2:trxDate>
    Cheers,
    Abhi...

  • How to use forfiles= without recreating over and over?

    I’m struggling trying to get some file testing done and can’t figure what the right combination of commands should be. The goal is to have a number of files created (64, for example), then run different tests on those files, varying the number of files tested (from 4 doubled to 64, for example).  Things work fine if I have the rd section of the script set as:
    rd=f4,fwd=fwd4,files=4,format=yes
    rd=f8,fwd=fwd8,files=8,format=yes
    rd=f16,fwd=fwd16,files=16,format=yes
    rd=f32,fwd=fwd32,files=32,format=yes
    rd=f64,fwd=fwd64,files=64,format=yes
    The problem with this is that if I want to repeat the test or run a different test, the files will be recreated, taking much longer than necessary, as well as possibly causing storage specific issues. If I use “format=restart” or “format=no”, I end up with an error message such as:
    old depth=1; new depth=1
    old width=1; new width=1
    old files=64; new files=4
    I’ve tried using”forfiles=(4-64,d)”, but that also gives me errors similar to the above. The overall goal is to have a directory with a specific number of files of the specified length (files=64,format=only on a special rd line?), then run multiple tests, varying the number of files to be tested without having to recreate them every time. I’ve tried all combinations of forfiles, format=, and most other keywords I can think of, but just can’t seem to be able to get things to work without vdbench telling me that I can’t test ’n’ files if the directory contains a number of files other than ’n’. Same file sizes in all cases; just want to test a different number of them.
    The real question is how I can use the forfiles= command in a script that will be run many times without having to create the files each and every time. I’m clearly missing an important concept, but after a week of trying, I can’t figure out what it is.
    Any ideas?

    Correct me if I am wrong: You want to have 64 files created, and then test using, then 8, then 16, etc.
    'forfiles' won't do this; the file count is an integral part of of a file system structure and can not be changed without starting all over with a complete format.
    How about using for 'workingsetsize' parameter? This won't allow you to directly specify the amount of files, but if your file sizes are all the same then you'll just have do do a little math.
    I just ran this:
    fsd=default,depth=1,width=1,files=100,size=10k
    fsd=fsd1,anchor=r:\junk\fsd1
    fwd=fwd1,fsd=fsd1,xfersize=4k,fileio=random,fileselect=random,threads=1
    rd=default,elapsed=3,interval=1
    rd=rd1,fwd=*,operations=(read),fwdrate=100,format=once,forwss=(20k,40k,60k)
    Note the use of 'format=once'.
    This is the result:
    C:\vdbench504\output>grep -i created logfile.html
    10:31:59.151 FILE_CREATES        Files created:                               100     100/sec
    10:31:59.152 DIRECTORY_CREATES   Directories created:                           1       1/sec
    10:31:59.235 localhost-0: Created workingset=20k subset for anchor=r:\junk\fsd1 using 2 of 100 files.
    10:32:03.405 localhost-0: Created workingset=40k subset for anchor=r:\junk\fsd1 using 4 of 100 files.
    10:32:07.297 localhost-0: Created workingset=60k subset for anchor=r:\junk\fsd1 using 6 of 100 files.
    Hope this helps,
    Henk.

  • How do I get my videos to upload from my sony handy cam when I get the message The following file could not be imported.  The file is in an unrecognized format. I am using a macbook pro version 10.9.3, I have 411 gb free space, it worked before I updated

    How do I get my videos to upload from my sony handy cam when I get the message The following file could not be imported.  The file is in an unrecognized format. I am using a macbook pro version 10.9.3, I have 411 gb free space, it worked before I downloaded the latest update for iphoto.

    You may be able to download and install the update from here: Digital Camera RAW Compatibility 6.01
    If I upgrade to Yosemite will I be forced to go to the new Photos program
    No. After upgrading (and of course make a back up first) you will need to update iPhoto to v9.6.1 (you won't be able to do this prior to upgrading). Here's how:
    Go to the App Store and check out the Purchases List. If iPhoto is there then it will be v9.6.1
    If it is there, then drag your existing iPhoto app (not the library, just the app) to the trash
    Install the App from the App Store.
    Sometimes iPhoto is not visible on the Purchases List. it may be hidden. See this article for details on how to unhide it.
    http://support.apple.com/kb/HT4928
    One question often asked: Will I lose my Photos if I reinstall?
    iPhoto the application and the iPhoto Library are two different parts of the iPhoto programme. So, reinstalling the app should not affect the Library. BUT you should always have a back up before doing this kind of work. Always.
    Photos is v1 of a new app, as yes it's not as mature as iPhoto. It uses a different technology for working with external editors. That requires Adobe to write an extension to let it hook into the new app. Not done yet, neither has anyone else.
    Going forward: iPhoto will run on OS 10.10., but there is no guarantee for subsequent versions of the OS. You might want to factor that into your anger term thinking.

  • How to use an .xsl file to transform input XML to re-formatted output XML?

    Hello,
    I have a .xml file from a report that I want to use a stylesheet to transform into a different .xml format.
    I am reading that I can create a .xsl file to read my input and then transform it to a new output .xml file.
    How do I load this into the Apps?
    I tried creating a template definition and loading the .xsl in as type 'XSL-TEXT' and also, I added
    <?xml-stylesheet type="text/xsl" href="Transform.xsl"?> to my xml data source. The output looked the same as the input.
    Has anyone done this before? Any suggestions would be great!
    Thanks
    -CC

    This is how I use e4x with HTTPService:
    import mx.collections.XMLListCollection;
    import mx.rpc.events.ResultEvent;
    [Bindable] private var claimsXLC:XMLListCollection;
    private function claimsHandler(evt:ResultEvent):void{
        claimsXLC = new XMLListCollection(evt.result..claim as XMLList);
    XML data is being returned, but I use XMLList to create the XMLListCollection.
    If this post answers your question or helps, please mark it as such.

  • How to use quarter format in "to_date()" function?

    Hi,
    I'm trying to use to_date() function with quarter format. How do I specify the format?
    For example to convert '2002 quarter 1' using the to_date function.
    I tried to_date('20021', 'YYYYQ'), and I got ORA-01820 cannot appear in date input format.
    Please help, thank you!!!

    You cannot use Q when inputting data, only when retrieving data. When inputting, you must enter a valid date. Oracle has to store a date and if you just enter a quarter, it can't figure out what date to store. See the examples below:
    SQL> -- test table:
    SQL> CREATE TABLE test_table
      2    (test_date DATE)
      3  /
    Table created.
    SQL> -- the wrong way to input:
    SQL> INSERT INTO test_table (test_date)
      2  VALUES (TO_DATE ('2002-1', 'YYYY-Q'))
      3  /
    VALUES (TO_DATE ('2002-1', 'YYYY-Q'))
    ERROR at line 2:
    ORA-01820: format code cannot appear in date input format
    SQL> -- the right way to input:
    SQL> INSERT INTO test_table (test_date)
      2  VALUES (TO_DATE ('27-OCT-2002', 'DD-MON-YYYY'))
      3  /
    1 row created.
    SQL> -- to output:
    SQL> COLUMN "Year and Quarter" FORMAT A16
    SQL> SELECT test_date,
      2         TO_CHAR (test_date, 'YYYY-Q') AS "Year and Quarter"
      3  FROM   test_table
      4  /
    TEST_DATE   Year and Quarter
    27-OCT-2002 2002-4
    1 row selected.

  • How to use format-date with the report parameter

    Hi all,
    How to use the format-date function with this tag,
    <?param@begin:P_FROM_DATE?><?$P_FROM_DATE?>
    this form date is coming from report parameter and is coming like this 2012/11/01 00:00:00.
    So now i need this in DD-MON-YYYY fromat.I tried like this <?param@begin:P_FROM_DATE?><?$format-date:P_FROM_DATE;'DD-MON-YYYY'?>
    but its giving error. Can any one pls tell how to convert it to customized date format.
    thanks & Regards
    Srikkanth.M

    Issue solved.
    Ref this link
    XML date Format

Maybe you are looking for