How to convert a xs: date for XS: DateTime

In my application, there are the following 2 cases, I need to manage:

  1. I have a "XS: date" and I need to convert it in "XS: DateTime".
  2. I have a "XS: date" and a "XS: Time" and I need to combine in ' XS: DateTime.

Following the answer to this question on Stackoverflow, I tried both " xs:dateTime($date) "and" fn:dateTime($date, $time) " but none of them worked.

When I used " xs:dateTime($date) " to manage the 1st case, I got the following exception during the OSB has reached the stage of conversion for the date:

OSB Replace action failed updating variable "body": Error parsing XML: {err}XP0021: "2014-12-09": can not cast to {http://www.w3.org/2001/XMLSchema}dateTime: error: date: Invalid date value: wrong type: 2014-12-09

When I used " fn:dateTime($date, $time) ", the transformation is not yet accepted by the IDE. " It displays the following error:

line 113, column 42: "{http://www.w3.org/2004/07/xpath-functions}dateTime" unknown function (or number of arguments (2) is wrong

For now, as a solution, I use 'concat' to combine the date and time fields in the 2nd case and add 'T00:00:00' to handle case 1, but I think that this is not a good approach.

I would be very grateful if you could show me how I can correctly convert date in dateTime format fields.

For the moment, I use OSB 11 g with the last v11.1.1.7.4 grouped patch applied.

Found in the documentation that, in fact, only the working paper 2004-07 is implemented in this version:

https://docs.Oracle.com/CD/E28280_01/admin.1111/e15867/XQuery.htm#OSBAG444

According to the specifications, the casting of XS: date for XS: DateTime should work:

XQuery 1.0 and XPath 2.0 functions and operators

But as I mentioned previously, it is perhaps that you do not pass the correct data type.

If the data are not based on a schema, then sch:jdOriginalPromisedDeliveryDate will be considered from type xdt: untypedAtomic and cannot be cast in all except XS: String.

Is - it works better:

{xs: date ($jdOriginalPromisedDeliveryDate) cast as xs: DateTime}

?

Tags: Oracle Development

Similar Questions

  • How to get back my data for the health and the watch Apps once I've restored my phone?

    How to get back my data for the health and the watch Apps once I've restored my phone?

    From the backup, you're going to be restoration.

    If you back up to iTunes, make sure that it is an encrypted backup.

  • How to convert a site MUSE for use on a smart phone?

    How to convert a site MUSE for use on a smart phone? Is it possible to automate this? I have to reduce all image sizes?

    In the current version of Muse, you have to look at the top bar in the Plan view and click on the button of phone . It offers you the ability to copy the plan of the pages (if you think it's useful for your mobile website), but not the content. Yes, you must manually copy and paste what you want to be present on mobile pages.

    With the upcoming version, you also get a different approach, next to it.

    Take a look: https://Max.Adobe.com/sessions/Max-online/#/video/4923

  • How to convert trial items 10 for a purchased DVD?

    How to convert trial items 10 for a purchased DVD?  I can not find anywhere to enter the serial numbers.  He used to bring up all the time, but now when I have the serial numbers, I don't find it anywhere.

    I found where to enter serial numbers: I had to go to the Publisher;  entry screen does not appear on the Home Page or from the Organizer.

  • How to convert to format Date in milliseconds

    Hi all

    I am getting the output of a variable in milliseconds format, how can I convert it in date format

    For ex: I get variable input like 1366664691000 and I need to convert it to April 22, 2013 23:04:51 CEST (or SOA form). is there any function for this in XSL or XPath?

    Thank you

    Hello

    My XSLT works now after making a few changes

    and included namespace xmlns:fn = "http://www.w3.org/2005/xpath-functions.

    Now, I'm successfully number of days. My use case is to delete the files of the bases on the number of days. (i.e. changed the time - current date).

    Once again thank you @ vladidos

  • How to convert a hex date?

    I notice with the release of SharePoint Foundation 2010 metadata using cfsharepoint dates/times are converted in the following format: 0x01cf2d81. 0x71c80a00

    How to convert it to a regular date using ColdFusion?  I found a few references to this question here http://sharepoint.stackexchange.com/questions/66602/dates-and-times-in-properties-vs-field s/91069 #91069 which shows a solution like this:

    //fieldValue looks like "0x01cf2f8e|0x6e559e00"
    string fieldValue = listItem.Properties[dateFieldName]
    string hexValue = fieldValue.Replace("|", "").Replace("0x", "");
    long ticks = long.Parse(hexvalue, NumberStyles.HexNumber);
    
    DateTime date1 = DateTime.FromBinary(ticks).AddYears(1600);
    

    But I have no idea how to do that in ColdFusion.  Apparently, the hexadecimal value represents the number of ticks since January 1, 1600.  Crazy, I know.

    Any ideas?  Thank you.

    Thanks for your help in this, Alexander.  I have worked on this for a day and discovered some useful information and finally found an easier way to do this.

    Below, you will see that the number of ticks can actually be retrieved using the method of parseLong() of Java.  I don't know what is happening with inputBaseN or why it does not work for this scenario, but we cannot forget that for now.  Also, I discovered Windows time system does not start at 1600, he begins to 1601.  The guy in the article I linked to really wrong, so apologies for any confusion on that!  Finally, I convert the date in local time.

    Here's the complete code to convert the hexagonal date of SharePoint at regular date using ColdFusion.  Hope this helps someone in a similar situation.

      
      
      
      
      
      
      
      
      
    

    By the way, here's a cool article about a guy who goes to something similar: http://ruthsarian.wordpress.com/category/programming/coldfusion/

  • How to convert String to Date

    hell there everyone,

    I have a question which is:

    How to convert a string that we get by reading an XML in the instance of date value type?

    So there is a XML that modifiedDate as an attribute on a node of the XML and how I put this value in an instance variable date?

    the timeformat in the XML file is: mm/dd/yyyy hh: mm: = > 31/12/2010 23:57:46

    I chose this time format because I want to use the method . parse() which always causes an error, but that's another topic...,.

    hope I was clear on the issue,

    Thanks in advance for the help.

    First of all, you should watch the Date object constructor to find out how to specify different parameters.

    public void Date (yearOrTimevalue:Object, month:number, date:number = 1, hour:number = 0, minute:number = 0, second:number = 0, millisecond:number = 0)

    Then you need to determne how to break the string by using the String.Split method.  The first split() should be the space between the date and time, the second for the slashes in the date and the third for the colon in time.

    Then you come to take each of these paintings of substrings and feed them in the constructor as the Number() values.

    If you remain unsure how to do this, look at the different terms that I have identified in the help documents and you will find them all explained with examples.

  • HOW to: Set the expiration date for the ThinApp package

    Hi all

    I'll build a .exe package and put it on a USB key for a user, but I want the package which should expire in say 30 days.

    I would like to know the 'syntax' to edit the file attribute.ini (package.ini), in order to define an expiration date for a ThinApp .exe package.

    Thank you

    Sang A

    You can do this by using a VBScript script that is included in the package, see example

  • How to convert varchar to date datatype all insert or update in the table

    Hai All

    I need to convert to varchar type to date.

    I have two Tables T1, T2

    Structure of T1

    Code varchar

    Time varchar

    Date varchar

    Structure of T2

    Var EmpName

    Empcode var

    Date of the respondent

    Outtime date

    Intrinsically date

    Date of Introut

    Att_date

    Now I need to spend the time form T1 to T2 respondent, outtime, intrinsically, introut under certain conditions

    So now I need to convert Varchar to Date so that the insert or update

    I tried something

    Insert into T1 (code, respondent, att_date) values

    (To_date(Date|| dele de code temps, «hh24mi de mon-dd-yyyy»), att_date);

    OR update while

    Setting a day set Outtime T2 = To_date(Date||) Time, 'hh24mi mon-dd-yyyy') where...


    I got an error Ora-01861


    Concerning

    Srikkanth.M

    You did not show an example of your date or time values, control may be necessary to add a space between them, like

    To_date(Date || ' ' || time,'dd-mon-yyyy hh24mi')
    
  • How to convert my 64 Kbps for bitrate appropriate?

    OK so I read a lot of 'tutorials' on how to do it, I understand that I will edit > Preferences > import settings and I get the stuff I want. After I have get confused as they say just click file and then create a new version, how do I do that?

    For reference, im trying to sync a song on my phone from my computer, but the bit rate to low, what are the set and what should I do to convert (in simple explanation of the precise words please) im also on windows.

    Thanks to all those who are trying to help me.

    In Edition > Preferences > general tab click on import settings, and then select AAC or MP3 encoder and adjust the flow to 128 k. Click OK twice to confirm the changes. Now select the song you want to convert and use file > convert > Create < Format > Version where the format will depend on your previous choice.

    TT2

  • How to convert number in date and time in labview

    Hi all

    I have a hexadecimal string and converted into a number. Now this number to display in the format of timestamp. Uses the format of the time Unix.

    By using this link, I can convert this number to timestamp.  http://www.UnixTimeStamp.com/index.php

    But how it should be done in LabVIEW? I know it may be simple, but please help.

    I enclose my VI for referance.

    Thank you

    Manisha

    Hi Man_Can,

    You can add the origin of UNIX timestamp to your number:

  • How to convert files audio wpl for use in Adobe Audition 3.0?

    I have some of my own voice-demo files in Windows Media Player as a .mpl file.  I would like to run these through my Adobe Audition 3.0 for editing purposes.  How can I do this?

    You can try this link.

    http://social.msdn.Microsoft.com/search/en-us?query=Windows%20media%20encoder%209%20%26%20Converting%20wpl%20Files&AC=5

    Also, I am sure that the WM Encoder has a download add-on for Adobe conversions.

    The default encoder can convert multimedia (audio/video)...

  • How Vmware Converter can be used for P2V or V2V

    I am a newcomer. I want to migrate my servers on vmware ESX3.5 or Vsphere server. How can I do?

    Thank you!

    George

    Installation on your VMware Server is better, then you can leave the converter cover/locate your VMware Server images locally. This method will ask you to turn off your virtual machines.

    Another method is P2V as that can be done while the virtual machine is running. On source, use your IP VM and destination for your ESX host.

    vcbMC - 1.0.6 Beta

    Lite vcbMC - 1.0.7

    http://www.no-x.org

  • How to convert the Dreamweaver site for wordpress

    I created a Web site in Dreamweaver for a customer, but they want the ability to edit the site yourself t.  Is there an easy way to convert this html site to something that will work in wordpress? Are there other sites that can do? Help! I don't want to re-design of this entire site that took me 3 months!

    I'm sorry.  But there is no automagic way to convert a static HTML site to WordPress.  Your client should you said from the start that they wanted a CMS.

    You could install WordPress as a blog (domain.com/blog/WP/).  The blog would be editable by your customer in WordPress, but the main site would remain static HTML.

    Another option is to reverse engineer your static HTML pages to work with another CMS product.

    Cushy CMS can be just what you need (see their video to see how it works).

    http://www.CushyCMS.com

    Seed content-

    Available in ASP, ASP.net or PHP

    No database needed.

    http://contentseed.com/

    Help the PowerCMS of Web-

    Requires PHP 5.2.3 +

    MySql database

    http://www.WebAssist.com/Dreamweaver-extensions/powercms-Builder/

    Good luck

    Nancy O.

    ALT-Web Design & Publishing

    Web | Graphics | Print | Media specialists

    http://ALT-Web.com/

    http://Twitter.com/ALTWEB

  • How to auto fill a date for an Adobe form field?

    Hello. I'm new to Acrobat. I would like to have the Acrobat auto today's date in a date field when I open an acrobat form. I check using forum and he said that I associate this javascript text field:

    var f = this.getField ("Today"); If (f.valueAsString == "'") f.value = util.printd ("mm/dd/yyyy", new Date());

    However, when I try, nothing happens.

    No idea as to what I'm doing wrong?

    -Michael

    Hi Mr. Krebs,.

    Y at - it a text field in the PDF document titled "Today" and defined as a date field? And the format of Date Options for the field value matches what is in the JavaScript (jj/mm/aaaa)?

    Best,

    Sara

Maybe you are looking for