Skip to Content
author's profile photo Former Member
Former Member

Problems inserting date values in Oracle 10g

Hi All,

I'm having SERIOUS problems trying to insert a simple date value in my oracle.

I did this one million times before in xMII 11.5, but now it appears that doesn't work anymore!

Here are some info:

Data Server Config:

Date Prefix: TO_DATE('

Date_Sufix: ', 'MM/DD/YYYY HH24:MI:SS')

Internal Date Format: yyyy-MM-dd HH:mm:ss

In my Query Template:

Date and Time Format: MM/dd/yyyy HH:mm:ss

In my Transaction

Parameter: datefromxmlformat(datenow, "MM/dd/yyyy HH:mm:ss")

I also tried change the parameter to datenow, no success.

I tried to change the Query Template format, no success.

Finally, I tried to change my Date prefix & sufix, no success too.

I really don't know what else I can do. I would appreciate some help.

PS: I'm using xMII 12.0.1 with ojdbc14.jar

Thanks in advance.

Pedro Sena

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Oct 19, 2007 at 12:42 PM

    Pedro,

    The Data Server config for InternalDateFormat should be: MM/dd/yyyy HH:mm:ss

    This is because it is used in conjunction with the DatePrefix and DateSuffix whenever you use the DateColumn or the [SD] and [ED] tokens in a query template.

    If you are inserting a date field with an arbitrary parameter (not a date token like above) then you need to use the TO_DATE wrapper pieces around your date field string.

    The DateFormat in the query template controls the format of the StartDate and EndDate buttons in the applet toolbar if using an iChart/iSPCChart/iGrid and a time sensitive query, but when you build the string for an insert parameter you must manage the whole format yourself.

    If you really just want datenow and the xMII server time is sufficient for your insert query then you can leverage the Data Server config settings like: INSERT INTO TABLE VALUES([ED)

    This way the default query template time settings will use 'now' for the end date of the query and when the string is sent to Oracle it will actually look like:

    INSERT INTO TABLE VALUES(TO_DATE('10/19/2007 08:41:00', 'MM/DD/YYYY HH24:MI:SS'))

    Regards,

    Jeremy

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.