Xsd:dateTime formatting problems

This is driving me nuts. I've been playing around with JAXB and it has worked great so far. Until now.
I have an xml file with this little block
   <timestamps>
      <created>2000-03-04T20:00:00Z</created>
      <last_modified>2003-03-14T02:20:02-05:00</last_modified>
   </timestamps>and in my xsd file I have
    <xsd:element name="timestamps" type="timestampsType" />
  <xsd:complexType name="timestampsType">
    <xsd:sequence>
      <xsd:element name="created" type="xsd:dateTime" />
      <xsd:element name="last_modified" type="xsd:dateTime" />
    </xsd:sequence>
  </xsd:complexType>Previously I had used just xsd:date instead of xsd:dateTime, and that worked fine, but then I realized that I needed more timing precision so I made the change. I can generate my java files with xjc without any problems. But when I go to unmarshall the xml file with validation on, I always get a complaint about the formatting of my date time values. More specificaly I see:
"com.sun.msv.verifier.ValidityViolation: "2000-03-04T20:00:00Z" does not satisfy the "date" type"
despite the fact that I copied this date directly from the XSD specification page at http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/
And believe me, I've tried about a dozen other variations.... Different dates, with extra milliseconds, with and without the timezone part at the end. I get the same error every time. So what am I doing wrong?

Thanks, but unfortunately that did not do the trick. Interestingly enough everything works perfectly, all other things the same, when I let Validation be set to false.

Similar Messages

  • Xsd datetime format

    Hi, I'm using a javascript popup calendar on a web page which can return a timestamp in either of 3 formats (i can choose whichever):
    dd-mm-yyyy hh:mm:ss
    mm/dd/yyyy hh:mm:ss
    yyyy-mm-dd hh:mm:ss
    I want to convert this form value into the xsd datetime format yyyy-MM-ddThh:mm:ss.
    How can I do this?
    I have been using the following code, but this just deals with today's date. I need to alter it so that it can deal with the value from the popup calendar:
    Calendar calendar = Calendar.getInstance();
    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'hh:mm:ss");
    StringBuffer sb = new StringBuffer( sdf.format(calendar.getTime()) );

    There is no piece ion your code which would set any value.
    Check the API for Calendar, it has many useful methods.

  • DateTime Format problem

    I am using CreateODBCDateTime() function to create Simple date time format as
    (mm/dd/yyyy- h:mm tt).  But, when I am dumping the file, format is changing to
    {ts '2011-08-06 00:00:00'} . I want it to appear as formated. I have used DateFormat() along with CreateODBCDateTime().
    In the real form the date and time are appering as formated.Please help. Thanks in advance.
    Vijay.

    Hi,
    CreateODBCDateTime() doesn't do any formatting for you, it creates an ODBCDateTime object. So when you output that object something like {ts '2011-08-06 00:00:00'} is what you get.
    If you want to format dates/times for display purposes you need to use the DateFormat() and TimeFormat() functions. So something like
    #DateFormat(yourDateTimeObject, "mm/dd/yyyy")# - #TimeFormat(yourDateTimeObject, "h:mm tt")#
    Will give you a formatted date and time.
    Hope this helps,
    Richard

  • Tip : datetime formats in XSD

    Hi,
    When reading a file, we wanted to specify the datetime format as something like : 02-JAN-2006 (with the name of the month).
    The datetime patterns can be directly set in the XSD of the file adapter because BPEL uses JAVA patterns. See doc : http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html
    As a consequence, a date field in the XSD will look like this :
    <element name="PurchaseDate" type="dateTime"
    nxsd:dateFormat="dd-MMM-yyyy"
    nxsd:style="terminated" nxsd:terminatedBy="${eol}" /> ]]
    I hope you will find this tip useful !
    Alexandre

    You can set different allowed input date-formats Re: format date
    Check if that setting exists in your forms60-environment and add it to your 10g-env-file (use FORMS_ instead of FORMS60_)

  • Mediator - convert XSD datetime to SQL date value

    Fusion 11g, JDev 11.1.1, W server 2008
    Hi there,
    using JDev we've defined a DB adapter (towards an ORACLE schema), which basically serves two operations: INSERT and SELECT. On the DB table we've got a DATE_TIME while on on the other side we've defined a wsdl where the INPUT operation takes as parameter an XSD DATETIME value.
    The values have different structures and so we've started to play with the "Assign Values" function on the Mediator component, unfortunately without any success.
    Right now our expression is the following
    from
    ora:formatDate($in.newEventParam/newEventParam/ns:executionTime,"dd-MMM-yy")
    to
    $out.LogCollection/top:LogCollection/top:Log/top:when
    As first question I would like to ask you if our approach is correct and in that case what's wrong with our expression as we tried to use the same pattern as we use in SQL.
    Second, we performed some tests using the EM console. On test failure it shown a stack trace saying only that there was a problem performing a transformation. That's a bit too less, especially when transformation is done on large amount of values. Is there any way to increase trace level and get further details on which transformation didn't work out?
    Thanks in advance
    Alessandro Ilardo

    Thanks Eric for the link. That helped me to get further details about the issue but unfortunately not enough to locate the cause.
    So here I definitely have an issue with the composite application and perhaps another one on getting a SOAP trace from the Mediator log. Even with the finest log level enabled I couldn't see what the Mediator receives from outside.
    The first problem instead, seams to be a missing SOAP parameter, I assume that's why on the log I see this
    [WEBSERVICE.name: AuditService] [J2EE_APP.name: soa-infra] [composite_instance_id: 40011] Transformation failed[[
    oracle.tip.mediator.infra.exception.MediatorException: ORAMED-01203:[No Part]No part exist with name "newEventParam" in source message.Possible Fix:Review the transformation definition in mplan.Contact Oracle Support if the error cannot be fixed.
         at oracle.tip.mediator.service.transformation.XSLTransformer.getPartDocument(XSLTransformer.java:221)
    [J2EE_APP.name: soa-infra] [composite_instance_id: 40011] Got an exception: java.lang.NullPointerException[[
    oracle.tip.mediator.infra.exception.MediatorException: ORAMED-01201:[Error in transform operation]Error occurred while transforming payload.Possible Fix:Review the XSL or source payload. Either the XSL defined does not match with the payload or payload is invalid.
    In this routing there are basically 2 things that take place, an XSL mapping and an Assign value expression.
    Everything is goes fine until we perform a test from the EM, there we get the error.
    Unless someone has further tips on this issue I am considering to make a call from SOAPUI and place WS Monitor in the middle to make sure if the mistake is in the application or platform.
    External WSDL
    <?xml version="1.0" encoding="UTF-8"?>
    <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://xml.virtual-lab.eu/schema/poc-soa/audit/wsdl" xmlns:ns="http://xml.virtual-lab.eu/schema/poc-soa/audit/def" targetNamespace="http://xml.virtual-lab.eu/schema/poc-soa/audit/wsdl">
         <wsdl:types>
              <schema xmlns="http://www.w3.org/2001/XMLSchema">
                   <import namespace="http://xml.virtual-lab.eu/schema/poc-soa/audit/def" schemaLocation="xsd/AuditParamsDef.xsd"/>
              </schema>
         </wsdl:types>
         <wsdl:message name="addNewRequestMessage">
              <wsdl:part name="newEventParam" type="ns:add"/>
         </wsdl:message>
         <wsdl:message name="searchRequestMessage">
              <wsdl:part name="searchParams" type="ns:search"/>
         </wsdl:message>
         <wsdl:message name="searchResponseMessage">
              <wsdl:part name="returnParam" type="ns:eventObj"/>
         </wsdl:message>
         <wsdl:portType name="AuditPortType">
              <wsdl:operation name="addNewEvent">
                   <wsdl:input message="tns:addNewRequestMessage"/>
              </wsdl:operation>
              <wsdl:operation name="searchForEvents">
                   <wsdl:input message="tns:searchRequestMessage"/>
                   <wsdl:output message="tns:searchResponseMessage"/>
              </wsdl:operation>
         </wsdl:portType>
         <wsdl:binding name="AuditBinding" type="tns:AuditPortType">
              <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
              <wsdl:operation name="addNewEvent">
                   <soap:operation soapAction="urn:#addNewEvent"/>
                   <wsdl:input>
                        <soap:body use="literal"/>
                   </wsdl:input>
              </wsdl:operation>
              <wsdl:operation name="searchForEvents">
                   <soap:operation soapAction="urn:#searchForEvents"/>
                   <wsdl:input>
                        <soap:body use="literal"/>
                   </wsdl:input>
                   <wsdl:output>
                        <soap:body use="literal"/>
                   </wsdl:output>
              </wsdl:operation>
         </wsdl:binding>
         <!--
         <wsdl:service name="AuditService">
              <wsdl:port name="AuditPort" binding="tns:AuditBinding" />
         </wsdl:service>
    -->
    </wsdl:definitions>
    XSL
    <?xml version="1.0" encoding="UTF-8" ?>
    <?oracle-xsl-mapper
    <!-- SPECIFICATION OF MAP SOURCES AND TARGETS, DO NOT MODIFY. -->
    <mapSources>
    <source type="WSDL">
    <schema location="../AuditService.wsdl"/>
    <rootElement name="newEventParam" namespace=""/>
    <rootElementDatatype name="add" namespace="http://xml.virtual-lab.eu/schema/poc-soa/audit/def"/>
    </source>
    </mapSources>
    <mapTargets>
    <target type="WSDL">
    <schema location="../AuditBackEndService.wsdl"/>
    <rootElement name="LogCollection" namespace="http://xmlns.oracle.com/pcbpel/adapter/db/top/AuditBackEndService"/>
    </target>
    </mapTargets>
    <!-- GENERATED BY ORACLE XSL MAPPER 11.1.1.0.0(build 090618.1440.5219) AT [WED DEC 02 22:51:43 CET 2009]. -->
    ?>
    <xsl:stylesheet version="1.0"
    xmlns:top="http://xmlns.oracle.com/pcbpel/adapter/db/top/AuditBackEndService"
    xmlns:xpath20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
    xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:mhdr="http://www.oracle.com/XSL/Transform/java/oracle.tip.mediator.service.common.functions.MediatorExtnFunction"
    xmlns:oraext="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:dvm="http://www.oracle.com/XSL/Transform/java/oracle.tip.dvm.LookupValue"
    xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath"
    xmlns:tns="http://xmlns.oracle.com/pcbpel/adapter/db/SOA-POC/AuditService/AuditBackEndService%2F"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:med="http://schemas.oracle.com/mediator/xpath"
    xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath"
    xmlns:ns="http://xml.virtual-lab.eu/schema/poc-soa/audit/def"
    xmlns:xdk="http://schemas.oracle.com/bpel/extension/xpath/function/xdk"
    xmlns:xref="http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.XRefXPathFunctions"
    xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:ora="http://schemas.oracle.com/xpath/extension"
    xmlns:socket="http://www.oracle.com/XSL/Transform/java/oracle.tip.adapter.socket.ProtocolTranslator"
    exclude-result-prefixes="xsi xsl ns xsd top tns plt wsdl xpath20 bpws mhdr oraext dvm hwf med ids xdk xref ora socket">
    <xsl:template match="/">
    <top:LogCollection>
    <top:Log>
    <top:who>
    <xsl:value-of select="/newEventParam/ns:fromUser"/>
    </top:who>
    <top:when/>
    <top:whichClient>
    <xsl:value-of select="/newEventParam/ns:usingClient"/>
    </top:whichClient>
    <top:whichSys>
    <xsl:value-of select="/newEventParam/ns:onSys/@ns:which"/>
    </top:whichSys>
    <top:ipClient>
    <xsl:value-of select="/newEventParam/ns:fromIP"/>
    </top:ipClient>
    <top:wsOperation>
    <xsl:value-of select="/newEventParam/ns:callingWS_Operation"/>
    </top:wsOperation>
    </top:Log>
    </top:LogCollection>
    </xsl:template>
    </xsl:stylesheet>
    Internal WSDL
    <?xml version="1.0" encoding="UTF-8"?>
    <toplink:object-persistence version="Oracle TopLink - 11g Release 1 (11.1.1.1.0) (Build 090527)" xmlns:opm="http://xmlns.oracle.com/ias/xsds/opm" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:toplink="http://xmlns.oracle.com/ias/xsds/toplink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <opm:name>AuditBackEndService-OR</opm:name>
    <opm:class-mapping-descriptors>
    <opm:class-mapping-descriptor xsi:type="toplink:object-relational-class-mapping-descriptor">
    <opm:class>AuditBackEndService.Log</opm:class>
    <opm:alias>LOG</opm:alias>
    <opm:primary-key>
    <opm:field table="LOG" name="ID" xsi:type="opm:column"/>
    </opm:primary-key>
    <opm:events xsi:type="toplink:event-policy"/>
    <opm:querying xsi:type="toplink:query-policy">
    <opm:queries>
    <opm:query name="AuditBackEndServiceSelect" xsi:type="toplink:read-all-query">
    <opm:criteria operator="and" xsi:type="toplink:logic-expression">
    <toplink:left operator="and" xsi:type="toplink:logic-expression">
    <toplink:left operator="equal" xsi:type="toplink:relation-expression">
    <toplink:left name="whichSys" xsi:type="toplink:query-key-expression">
    <toplink:base xsi:type="toplink:base-expression"/>
    </toplink:left>
    <toplink:right xsi:type="toplink:parameter-expression">
    <toplink:parameter name="sys" xsi:type="opm:column"/>
    </toplink:right>
    </toplink:left>
    <toplink:right operator="greaterThanEqual" xsi:type="toplink:relation-expression">
    <toplink:left name="when" xsi:type="toplink:query-key-expression">
    <toplink:base xsi:type="toplink:base-expression"/>
    </toplink:left>
    <toplink:right xsi:type="toplink:parameter-expression">
    <toplink:parameter name="fromWhen" xsi:type="opm:column"/>
    </toplink:right>
    </toplink:right>
    </toplink:left>
    <toplink:right operator="lessThanEqual" xsi:type="toplink:relation-expression">
    <toplink:left name="when" xsi:type="toplink:query-key-expression">
    <toplink:base xsi:type="toplink:base-expression"/>
    </toplink:left>
    <toplink:right xsi:type="toplink:parameter-expression">
    <toplink:parameter name="toWhen" xsi:type="opm:column"/>
    </toplink:right>
    </toplink:right>
    </opm:criteria>
    <opm:arguments>
    <opm:argument name="sys">
    <opm:type>java.lang.String</opm:type>
    </opm:argument>
    <opm:argument name="fromWhen">
    <opm:type>java.lang.String</opm:type>
    </opm:argument>
    <opm:argument name="toWhen">
    <opm:type>java.lang.String</opm:type>
    </opm:argument>
    </opm:arguments>
    <toplink:reference-class>AuditBackEndService.Log</toplink:reference-class>
    <toplink:container xsi:type="toplink:list-container-policy">
    <toplink:collection-type>java.util.Vector</toplink:collection-type>
    </toplink:container>
    </opm:query>
    </opm:queries>
    </opm:querying>
    <opm:attribute-mappings>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>id</opm:attribute-name>
    <opm:field table="LOG" name="ID" xsi:type="opm:column"/>
    <toplink:attribute-classification>java.math.BigDecimal</toplink:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>who</opm:attribute-name>
    <opm:field table="LOG" name="WHO" xsi:type="opm:column"/>
    <toplink:attribute-classification>java.lang.String</toplink:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>when</opm:attribute-name>
    <opm:field table="LOG" name="WHEN" xsi:type="opm:column"/>
    <toplink:attribute-classification>java.sql.Timestamp</toplink:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>whichClient</opm:attribute-name>
    <opm:field table="LOG" name="WHICH_CLIENT" xsi:type="opm:column"/>
    <toplink:attribute-classification>java.lang.String</toplink:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>whichSys</opm:attribute-name>
    <opm:field table="LOG" name="WHICH_SYS" xsi:type="opm:column"/>
    <toplink:attribute-classification>java.lang.String</toplink:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>ipClient</opm:attribute-name>
    <opm:field table="LOG" name="IP_CLIENT" xsi:type="opm:column"/>
    <toplink:attribute-classification>java.lang.String</toplink:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>wsOperation</opm:attribute-name>
    <opm:field table="LOG" name="WS_OPERATION" xsi:type="opm:column"/>
    <toplink:attribute-classification>java.lang.String</toplink:attribute-classification>
    </opm:attribute-mapping>
    </opm:attribute-mappings>
    <toplink:descriptor-type>independent</toplink:descriptor-type>
    <toplink:caching>
    <toplink:cache-type>weak-reference</toplink:cache-type>
    <toplink:always-refresh>true</toplink:always-refresh>
    </toplink:caching>
    <toplink:remote-caching>
    <toplink:cache-type>weak-reference</toplink:cache-type>
    </toplink:remote-caching>
    <toplink:instantiation/>
    <toplink:copying xsi:type="toplink:instantiation-copy-policy"/>
    <toplink:tables>
    <toplink:table name="LOG"/>
    </toplink:tables>
    <toplink:structure>structureName</toplink:structure>
    </opm:class-mapping-descriptor>
    </opm:class-mapping-descriptors>
    <toplink:login xsi:type="toplink:database-login">
    <toplink:platform-class>oracle.toplink.platform.database.oracle.Oracle9Platform</toplink:platform-class>
    <toplink:user-name></toplink:user-name>
    <toplink:connection-url>null</toplink:connection-url>
    </toplink:login>
    </toplink:object-persistence>

  • How to deal with xsd:dateTime from webservice in ADF? (Frank can you help?)

    I have a webservice that returns a date in the yyyy-MM-dd'T'HH:mm:ss.SSSZ format (as far as i know the default Calendar type format) specified by an xsd:dateTime. When i generate a webservice datacontrol on the service i get an entry like <Attribute Name="testDate" IsUpdateable="0" Type="java.util.Date" /> in the datacontrol xml file generated for the service (should that not be a java.util.Calendar type?). When i try to output the value on a jsf page it results in the following error:
    oracle.jbo.domain.DataCreationException: JBO-25009: Can not create object of type java.util.Date with value 1994-02-01T00:00:00.000+01:00
    As far as i understand adf tries to create a java.util.Date object from the webservice output 'string' which fails. The webservice is a plsql webservice generated with jdeveloper. If i change the type in the datacontrol xml file from java.util.Date to java.lang.String it prints out the entire date string but i would like to keep it a date type to be able to format the output to the dd-MM-yyyy pattern.
    Any help or suggestions.....?
    Kind Regards,
    Andre Jochems
    Repost
    Repost

    Andre,
    sorry, for not replying earlier - missed this post obviously. I don't know whether or not the behavior you see is correct or a bug - need to investigate this first (or find somebody to invest).
    However, as a work around for now you can:
    Option 1: bind the UI component to a managed bean that then accesses the binding layer to access the Web Service Data Control. This way you can work with Strings and just create a java.util.Date object for the component using the SimpleDate formatter
    Option 2: Use a Web Service proxy and a JavaBean DataControl to access the proxy. This allows pre-processing of the Web Service response, e.g. handling the Date
    Note that this is just for possible work around until I find the time to look at this. However, if this is a blocking issue for a production application then I suggest to contact customer support for immediate help
    Frank

  • Migration Issues from Informix to Oracle (datetime format)

    Hello, i am performing a Migration from Informix to Oracle, drive by Migration Workbench, i have an error migrating data from datetime and date fields. I suppose its related by datetime and date format, cause the error tells "Incorrect day or month" when i am migrating data from informix. Targets Oracle database date format is DD/MM/YYYY and source`s Informix database date format like MM/DD/YYYY. Is there any way, in OMW, to specify the mask of datetime or date format to convert date strings from informix to oracle format? Or have i got migrate offline and modify control file to do that with sql*loader?
    How can i do that?
    Example, especify to_date('....', 'MM/DD/YYYY H24:MI:SS') format for migrating informix datetime fields to Oracle.

    The problem i have is, several tables witch contains date and datetime fields, at the same table in informix, by migrating drive by omwb to oracle, the date format i receive from informix at reading is DD/MM/YYYY and datetime format receiving is HH24:MI:SS. Migrating date and datetime types from informix to date, both types to date in oracle, i get an error while matching DD = HH24, MM = MI and YYYY = SS where nls_date_format is DD/MM/YYYY and, the same error matching HH24 = DD, MI = MM and SS = YYYY when nls_date_format is HH24:MI:SS.
    If i set nls_date_format as "DD/MM/YYYY HH24:MI:SS" i get the same error, cause reading data from informix results in data format "DD/MM/YYYY" for date fields and "HH24:MI:SS" for datetime fields.
    I have more than 200 tables in informix with this problem to migrate to oracle, i can solve by migrating offline, modifying datacontrol file to casting to_date format, but over 200 tables, 200 datacontrol files... is there any way for solving that by online migration in omwb?

  • Need help in datetime format.

    hi there,
    currently, i have problem in converting datetime format into this pattern (yyyy-MM-dd).
    I could able to convert it in JSTL which is
    <c:set var="dates"><fmt:formatDate value="${now}" type="DATE" pattern="yyyy-MM-dd"/></c:set>
    <sql:query var="countLeave"
         sql =" SELECT * FROM VCST_EMPLOYEE_LEAVE WHERE CAST(FLOOR(CAST(leave_from AS FLOAT))AS DATETIME) = ? ">
              <sql:param value="${dates}"/>
         </sql:query>
    From the JSTL code above i would like to convert in Java code. I have no idea on how to convert it especially not converting the datetime datatype from MSSQL into String format.
    Is there any way of doing it. Thank you.

    try this
    // Format the current time.
    java.text.SimpleDateFormat formatter
    = new java.text.SimpleDateFormat ("yyyy-MM-dd");
    java.util.Date currentTime_1 = new java.util.Date();
    String dateString = formatter.format(currentTime_1);

  • POI HSSFWorkbook using to read data of datetime format

    Hi
    I am trying to read the drata from excel sheet which contain data as in date format.
    The data is in the datetime format but I am unable to read this data in our jsp page.
    its shows the cell type is of integer type.
    able to read simple date in format yyyy/mm/dd but getting problem in yyyy/mm/dd hh mm format.
    guide me what to to.
    Thanks
    parveen kumar

    Hi
    I am trying to read the drata from excel sheet which contain data as in date format.
    The data is in the datetime format but I am unable to read this data in our jsp page.
    its shows the cell type is of integer type.
    able to read simple date in format yyyy/mm/dd but getting problem in yyyy/mm/dd hh mm format.
    guide me what to to.
    Thanks
    parveen kumar

  • Trouble with SQL datetime format

    I have written a VI to import a CSV file into a SQL data table but I
    cannot get it to work when using a table with "datetime" data
    format.  It will import into a new table with undefined data
    formats as "varchar" format but no luck when going into a table with the "datetime" data
    format.   I need the datetime format for date/time queries later.
    I have attached a zip file of my VI and the CSV file.  Is there a problem with my CSV format or I am I doing
    something else wrong here?
    Please help.
    Thanks,
    Greg
    Attachments:
    SQL issue.zip ‏54 KB

    Greg
    I have just tried to insert your data into a SQL Server (MSDE) database.
    I found that the INSERT data didn't work. The TRUE for Create Table didn't seem to do any thing. So I created a table using labview like this
    And this is its design.
    I then run the vi again and it starts to work with no issues. So it looks like the Create Table?=TRUE for the INSERT doesn't seem to work on SQL Server. It looks like you need to create the table first.
    Here is your data in the database
    Let me know what you think
    David
    Message Edited by David Crawford on 04-28-2006 11:17 AM
    Attachments:
    Your Data.jpg ‏32 KB
    Create Table.jpg ‏20 KB
    Table Design.jpg ‏15 KB

  • Date format problem in Developer Forms 90

    My platform is NT40 and Developer Forms 90.
    PRE-FORM trigger is :
    SET_APPLICATION_PROPERTY(PLSQL_DATE_FORMAT, 'DD-MM-YYYY');
    SET_APPLICATION_PROPERTY(BUILTIN_DATE_FORMAT, 'DD-MM-YYYY');
    FORMS_DDL('ALTER SESSION SET NLS_DATE_FORMAT = "DD-MM-YYYY");
    message(GET_APPLICATION_PROPERTY(USER_NLS_DATE_FORMAT));
    Variable USER_NLS_DATE_FORMAT is 'YY/MM/DD'!
    Where is problem ?

    From the online help:
    USER_DATE/DATETIME_FORMAT Returns the current value of the user date or datetime format mask (which is established in the FORMSnn_User_Date/Datetime_Format environment variable).

  • Save xsd:dateTime in java.util.Date

    Hi,
    can anybody give me a code snippet to save a String representing an xsd:dateTime (probably containing timezone information) to java.util.Date?
    I really don't know how to do it.
    Thanks,
    Sven

    In general if you have a String that contains a formatted date, and you want to make a Date object out of that, then you use a java.text.SimpleDateFormat object and its parse() method.

  • Incorrect Timestamp dateTime format: expected YYYY-MM-DDTHH:MM:SS.NNNNNNNNN

    When i insert the data XML data using BPEL Process getting the following exception for date-format
    detail>oracle.j2ee.ws.client.jaxws.JRFSOAPFaultException: Client received SOAP Fault from server : Exception Description: Incorrect Timestamp dateTime format: [2010-01-01] (expected [YYYY-MM-DDTHH:MM:SS.NNNNNNNNN])</detail>
    </part>
    I have used the following date format and tried all the cases same above error.
    xp20:format-dateTime(../../DocumentHeader/EffectiveDate,'[Y0001]-[M01]-[D01] [h]:[m01]:[s01]')
    xp20:format-dateTime(../../DocumentHeader/EffectiveDate,'[Y0001]-[M01]-[D01]')
    Any idea how to convert Date to date format given error?

    Hi,
    I'm guessing the problem is not with the format, but with the input date...
    What content is coming in your EffectiveDate tag?
    It should be something like this...
    <EffectiveDate>2012-08-06T12:11:01Z</EffectiveDate>
    If the date format is not in ISO 8601, the XPath function won't work...
    Cheers,
    Vlad

  • Invalid datetime format (null) Elements 4 and 7

    I have about 20,000 photos in Elements 4 organizer (windows XP SP2). I am trying to get the catalog in shape to be converted to Elements 7 format--it will not convert at present, telling me the file has errors in which need to be fixed before conversion. In Elements 4 I've run "Recovery" which completes successfully (several times). I've tried "reconnect all files" which reports all files are connected.
    But I think I have found the problem. There is one file/photo with the same name (it is the same photo) both inside and outside of a version set. I do not know how or when this happened.
    Whenever I try to do any of the following I get the same error
    1. Delete either version of the file (i.e. inside or outside of the version set)
    2. Stack the outside file/photo with the 2 in the version set
    3. Convert the version set to individual photos
    The Error is
    The ODBC data source reported the following error
    "[Microsoft][ODBC Microsoft Access Driver] Invalid datetime format (null)"
    By the way, the metadata for this photo has a proper date. I have tried various tricks like deleted the file outside of Elements, adding it back with a reconnect, etc. No resolution.
    I am completely stumped. By the way, other than this, the Organizer seems to work OK (a bit slow sometimes, but that is relative. I was hoping 7 would be faster).
    Please advise.

    John
    Thanks for the tips. The following are the last several lines from the conversion log:
    created media a:107486 for file "J:/Album of Photos/2005 Photos/2005_04_22 Barcelona/133_3382_edited-1.jpg"
    created media a:107502 for file "J:/Album of Photos/2005 Photos/2005_04_22 Barcelona/133_338920050423.JPG"
    created media a:107518 for file "J:/Album of Photos/2005 Photos/2005_04_22 Barcelona/133_3387.JPG"
    created media a:107534 for file "J:/Album of Photos/2005 Photos/2005_04_22 Barcelona/133_3388.JPG"
    created media a:107550 for file "J:/Album of Photos/2005 Photos/2005_04_23 Barcelona/133_3386.JPG"
    The file 133_3386 is the problem file I noted. However the first instance in the log above has a 2005_04_22 date, which does not exist in the actual file.
    I don't have PSE5 and I don't know ACCESS. Does any of this make sense?
    Ralph

  • DateTime Format issue

    Hi All,
    I have an application developed in SOA 11.1.1.4. The SOA application receives live feed from third party and stores into database.
    The problem is the third party feed contains datetime field value as '2011-04-29T13:25:30.0000000+10:00' which the DB adapter does not seem to like. The String value looks as per the expected iso 8601 xs:dateTime format.
    Please suggest what to do? The error details are as below.
    Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'insert' failed due to: DBWriteInteractionSpec Execute Failed Exception. insert failed. Descriptor name: [ODS_EVENT.OdsEvent]. Caused by Exception [EclipseLink-3001] (Eclipse Persistence Services - 2.1.2.v20101206-r8635): org.eclipse.persistence.exceptions.ConversionException Exception Description: The object [2011-04-29T13:25:30.0000000+10:00], of class [class java.lang.String], could not be converted to [class java.sql.Timestamp]. Internal Exception: BINDING.JCA-11636 Could Not Convert Timestamp Exception. Unable to convert a string value in the xml to a java.sql.Timestamp. Even though databases accept strings representing timestamps in a variety of formats, the adapter only accepts strings representing them in xml ISO dateTime format. The input value must be in *iso 8601 xs:dateTime format*, i.e. *YYYY-MM-DDTHH:MM:SS.sss-07:00* . Please see the logs
    Thanks

    Before invoking the DB adapter use a XSLT to convert the date format. There are lots of functions in XSLT which can let you do this like
    +<xsl:value-of select='xp20:format-dateTime(InputDate,"[Y0001]-[M01]-[D01]")'/>+
    In case none of them, try converting using a java embedding node or manipulating the date like a string in XSL.
    -AR

Maybe you are looking for