Professional Web Applications Themes

Is there an equivalent for "alter session set NLS_DATE_FORMAT = 'dd-mm-yyyy'" in Informix? - Informix

Hello everybody, does anybody know, if there exists an alternative for "alter session set NLS_DATE_FORMAT = 'dd-mm-yyyy'" in Informix? We found this statement in an application which uses an Oracle-DB. Now we have to modify this application so that a Informix-DB can be used. Unfortunately this statement causes a syntax error, because Informix doesn't know "alter session ...". To modity the environment variable DBDATE is not the solution we need, because this has no effect when the database is already open. This application offers the feature to modify the date-format within the running applikation. Best thanks Mathias...

  1. #1

    Default Is there an equivalent for "alter session set NLS_DATE_FORMAT = 'dd-mm-yyyy'" in Informix?

    Hello everybody,

    does anybody know, if there exists an alternative for

    "alter session set NLS_DATE_FORMAT = 'dd-mm-yyyy'"

    in Informix?


    We found this statement in an application which uses an Oracle-DB. Now
    we have to modify this application so that a Informix-DB can be used.
    Unfortunately this statement causes a syntax error, because Informix
    doesn't know "alter session ...".

    To modity the environment variable DBDATE is not the solution we need,
    because this has no effect when the database is already open. This
    application offers the feature to modify the date-format within the
    running applikation.

    Best thanks
    Mathias
    Mathias Guest

  2. #2

    Default Re: Is there an equivalent for "alter session set NLS_DATE_FORMAT= 'dd-mm-yyyy'" in Informix?

    Mathias wrote:
    > does anybody know, if there exists an alternative for
    >
    > "alter session set NLS_DATE_FORMAT = 'dd-mm-yyyy'"
    >
    > in Informix?
    Directly - no.
    > We found this statement in an application which uses an Oracle-DB. Now
    > we have to modify this application so that a Informix-DB can be used.
    > Unfortunately this statement causes a syntax error, because Informix
    > doesn't know "alter session ...".
    >
    > To modity the environment variable DBDATE is not the solution we need,
    > because this has no effect when the database is already open. This
    > application offers the feature to modify the date-format within the
    > running applikation.
    OK - in that case fetch the dates into a C 4-byte integer instead of a
    string and format the string on the client side - there are formatting
    functions to do what you need doented in the ESQL/C manual.

    Or, if you are stuffing data into DATE columns, then you need to
    convert the string into a 4-byte integer before sending it to the server.

    Also, consider using the TO_CHAR or TO_DATE functions - they are
    similar to Oracle's functions and will work much the same job.

    --
    Jonathan Leffler #include <disclaimer.h>
    Email: [email]jlefflerearthlink.net[/email], [email]jlefflerus.ibm.com[/email]
    Guardian of DBD::Informix v2003.04 -- [url]http://dbi.perl.org/[/url]

    Jonathan Leffler Guest

Similar Threads

  1. Replies: 10
    Last Post: March 2nd, 08:56 PM
  2. Equivalent of "friend" or package-level access?
    By Nathan Weston in forum Ruby
    Replies: 1
    Last Post: September 5th, 06:44 PM
  3. Modify>Alter Path> "Inset Path" and "Expand Stroke" ERRONEOUS??
    By JoSe_AnGeL webforumsuser@macromedia.com in forum Macromedia Fireworks
    Replies: 0
    Last Post: September 1st, 11:07 PM
  4. Replies: 1
    Last Post: July 23rd, 12:18 AM
  5. Replies: 0
    Last Post: January 9th, 06:19 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139