Oracle Date/Timestamp issue

Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default Oracle Date/Timestamp issue

    I've got my first CF app with an Oracle database (10g Rel 2.).
    When I retrieve a date type field (including hour, minutes, and seconds) it
    gets truncated to just date (seen via cfdump).
    When I alter the table column to type timestamp, when it comes back I get an
    error:
    Unable to convert type oracle.sql.Timestamp to date.

    There is an Oracle FAQ that says starting with 9.2 in jdbc, the DATE field
    are mapped to java.sql.Date and the Timestamp fields are mapped to
    java.sql.Timestamp. And java.sql.Date does not include hours, mins, seconds.
    Prior to 9.2 Oracle date was mapped to timestamp. I understand that Oracle DATE
    field do not inlcude fractions of seconds, where Timestamp fields do.

    All I want is the hour, minutes, and seconds without splitting up the data
    into a date field and a time field in my database.
    I'm using Oracle jdc 10.2 tar. Is there a configuration to map the Oracle Date
    or Timestamp types to a date field where I can use CFs DateFormat and
    TimeFormat.



    Greg Campbell Guest

  2. Similar Questions and Discussions

    1. #39245 [NEW]: date function generate wrong date with 1162083600 timestamp
      From: lohner at aldea dot hu Operating system: Linux PHP version: 5.1.6 PHP Bug Type: Date/time related Bug description: ...
    2. timestamp to date ?
      I need to output a date and time that shows more clearly than just outputting the timestamp what is the correct way to go about it ? I have...
    3. Date/Time and TIMESTAMP
      I would like to get the exact time from a timestamp on my computer. Can you help me.
    4. timestamp with no date, ideas welcome
      Hi, I have a predicament. I have a file I download every 5 minutes and then load the data into the database. The problem is that it comes with a...
    5. Problems with TIMESTAMP on Oracle 9i
      "Ola Martin Lykkja" <lykkja@hotmail.com> wrote in message news:3f02d1f2$1@news.broadpark.no... Martin Cut & pasted from your message : SQL>...
  3. #2

    Default Re: Oracle Date/Timestamp issue

    Duh, thoroughly seach the forum before posting.

    OK, so the solution (for most) appears to be add this to the CF Admin JVM
    settings:
    -Doracle.jdbc.V8Compatible=true
    ,including the leading dash.

    It worked for me!





    Greg Campbell Guest

  4. #3

    Question Re: Oracle Date/Timestamp issue

    So were you not able to use Coldfusion's DateFormat() and TimeFormat() functions before adding that line to the ColdFusion Admin JVM settings?
    Anton Thorn is offline Junior Member
    Join Date
    Jun 2011
    Posts
    1

Posting Permissions

  • You may not post new threads
  • You may 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