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

Similar Messages

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

  • 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).

  • 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

  • How To Get Only Month or Only Year from datetime format of yyyy-mm-dd

    Hi SQL gurus,
    I have field has datetime format of yyyy-mm-dd (ie. 2014-11-28).  Could anyone please educate me on how to extract only month (ie. November but not 11) and only year (ie, 2014) from 2014-11-28.  I writing two report have title of Number of
    sick leaves on November  and Number of sick leaves in 2014.  I am planning to extact 11 from 2014-11-28 and display as November on report title and the same goes for 2014.  Unless you have better non complicated way.   Thank you
    very much in advance.  DingDong!!

    There are multiple ways
    Month name
    SELECT DATENAME(mm,@DateParam)
    SELECT FORMAT(@DateParam,'MMMM')
    Year
    SELECT FORMAT(@DateParam,'yyyy')
    SELECT DATEPART(yy,@DateParam)
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Exception in XML Parser (format problem?)

    Hi Experts,
    I am working on IDOC -> AS2 Configuration and the AS2 Configuration has the below structure
    <RecordSet>
         <Row1>
                       <row1 - field1>
                       <row1 - field2>
                       <row1 - field3>
         </Row1>
         <Row2>
                       <row2 - field1>
                       <row2 - field2>
                       <row2 - field3>
         </Row2>
         <Records>
              <Record1>
                        <Record1-Field1>
                        <Record1-Field1>
                        <Record1-Field1> 
              </Record1>
              <Record2>
                        <Record2-Field1>
                        <Record2-Field1>
                        <Record2-Field1> 
              </Record2>
         </Records>
    </RecordSet>
    We are getting the expected Structure when we AS2 Receiver has the xml format. But while doing module development with the strctxml2Plain, we are getting the below error  in RWB CC Monitoring.
    Message processing failed. Cause: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'java.lang.Exception: Exception in XML Parser (format problem?):'java.lang.NullPointerException''; nested exception caused by: java.lang.Exception: Exception in XML Parser (format problem?):'java.lang.NullPointerException'
    Any ideas, why this error we are getting.....
    Thanks in advance,
    Regards,
    Vasu

    Hi Vasu,
    Not in the Mapping of IR.
    In BIC Mapping Designer you have to test with the standard Mappings by providing the sample file whether the Conversion is happening correctly or not.
    You have to take the same input file that what ever you are having now.
    So that it will say clearly what is the problem in converting the XMLto the required EDI Format...
    Check whether you have any Date Format Values are comming from the input file.
    Regards
    Seshagiri

  • Attempt to process file failed with Exception in XML Parser-format problem

    Hi all,
    Iam getting an unusual error in the J2EE stack in XI.
    And the message is:
    006-11-30 17:31:07 Error Attempt to process file failed with Exception in XML Parser (format problem?):'com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: Invalid char #0xf(:main:, row:1, col:1044002)(:main:, row=1, col=1044002) -> com.sap.engine.lib.xml.parser.ParserException: Invalid char #0xf(:main:, row:1, col:1044002)' 2006-11-30 17:31:07 Error Exception caught by adapter framework: null 2006-11-30 17:31:07 Error Delivery of the message to the application using connection AFW failed, due to: RecoverableException.
    My scenerio iam posting IDOC to a flat file with content conversion in the receiver side,the mapping got executed successfully and in the audit log i found that the error was after the 'Start converting XML document content to plain text'.
    This means that error occured during content conversion of XML to the prescribed file format.
    Can anyone suggest any better approach using which we may trace the junk data in IDoc. Manual adhoc approach could take time and is error prone.
    Thanks in advance...
    karun

    Hi Bhavesh,
    Thanks for the early reply. I checked the mapping and everything is fine and the output is also in valid XML format.
    The audit log shows that the mapping got executed successfully and the error is after the step 'Start converting XML document content to plain text '. Is there any constraint in the file adapter regarding the message size for parsing.
    2006-11-30 17:30:50 Success Transfer: "BIN" mode, size 2912595 bytes, character encoding -
    2006-11-30 17:30:50 Success Start converting XML document content to plain text
    2006-11-30 17:31:07 Error Attempt to process file failed with Exception in XML Parser (format problem?):'com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: Invalid char #0xf(:main:, row:1, col:1044002)(:main:, row=1, col=1044002) -> com.sap.engine.lib.xml.parser.ParserException: Invalid char #0xf(:main:, row:1, col:1044002)'
    2006-11-30 17:31:07 Error Exception caught by adapter framework: null
    2006-11-30 17:31:07 Error Delivery of the message to the application using connection AFW failed, due to: RecoverableException.
    2006-11-30 17:31:07 Success The asynchronous message was successfully scheduled to be delivered at Thu Nov 30 17:36:07 GMT 2006.
    2006-11-30 17:31:07 Success The message status set to WAIT.
    2006-11-30 17:31:08 Success Acknowledgement creation triggered for type: SystemErrorAck
    2006-11-30 17:31:08 Success Acknowledgement sent successfully for type: SystemErrorAck
    2006-11-30 17:36:08 Success Retrying to deliver message to the application. Retry: 1

  • I am exporting a pages doc to ePub and I keep getting formatting problems any idea thx in advance

    I am exporting a pages doc to ePub and I keep getting formatting problems any idea thx in advance

    Since you don't say what the "formatting problems" are, all we can say is:
    "There, there. Hope they get better."
    Peter

  • Smartform: Formatting Problem with QUAN-Field

    I want to print a smartform and get exception 1 (formatting error). With function SSF_READ_ERRORS I get an error table. There is on entry: errnumber = 020011, msgid = SSFCOMPOSER, msgty = E, msgno = 601, msgv1 = wa_outtab-menge.
    It seems to be a formatting problem with field WA_OUTTAB-MENGE. But in the structure this field is referenced correctly.
    Does anybody know a solution?

    I solve this kind of problem in my SmartForm.
    Try this:
    Go to "Global Definitions" Node, then "Current/Quant.Fields" tab and set these values:
    Field Name:      WA_OUTTAB-MENGE
    Reference Field: WA_OUTTAB-MEINS
    Data Type:       QUAN
    Best Regards,
    Eduardo Ribeiro.

Maybe you are looking for

  • Which command i use to run SWING APPLET

    Hi friends, i m a new in swing technology i got and problem when i run swing applet . i make a file and complie it with -deprecation it work and make a .class file but how can i run this applet [i use jview command , appletviewer command but it can't

  • ICal almost impossible to see the text. How I can make it more clear?

    My iCal application comes with text and design so faint that it is almost impossble to read dates.

  • Notifications in lock screen

    notifications not working properly?all settins in lock mode?

  • Smooth integration of iWorks documents between iMac and iPad

    I have an iMac with Lion 10.7,4 and an iPad 5.1.1.  I would like to work with iWork files on both devices, and move the files between both devices.  This seems simple but isn't.  I've tried Webdav but can get it to run.  I'm getting very frustrated w

  • EPS File format

    Does anyone know how to work with EPS files programmatically (Enhanced Post Script I think)... I have seen the odd library for creating them, but what I want to do is take an existing one, extract any meta data from it (image description etc may be e