Problem with an extra .0 added to Datetime field

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

  1. #1

    Default Problem with an extra .0 added to Datetime field

    Hi.

    We have just installed a new W2k3 server with CFMX7 and MySQL 4.0.21 and moved
    an application from an older W2k server with CF4.5 and MySQL 4.0.12. Everything
    works fine expect one thing. It would appear that whenever we exact a datetime
    from a datetime field in the database an extra .0 is added to the end of the
    date, for example:

    2005-05-05 09:58:33

    becomes

    2005-05-05 09:58:33.0

    This then causes a problem if we try and just any date functions, giving us
    the message:

    "2005-05-05 09:58:33.0" is an invalid date format.

    Anyone else had this? Is it a CFMX7 or MySQL issue? Is there a solution?


    andrewdixon Guest

  2. Similar Questions and Discussions

    1. NULL To DateTime field through sp
      How can I insert null value into a datetime field through stored procedure? i use cybase,cf 4
    2. auto-update a datetime field in mysql...
      hi guys, me again ! i need to update a record in a mysql table. now i have defined a datetime field when a record is modified... i want to 'auto...
    3. Set a datetime field to Null
      Hi I created a record set at client side and added a coulmn as date time DBRS = CreateObject("ADODB.RecordSet") DBRS.Fields.Append...
    4. get week from date/datetime field
      Hi, I have a very basic quesetion but I can't find any answer by myself. Is it possible to extract number of week from date/datetime column?...
    5. note 33931 added to ref.datetime
      Another age calculator. The argument has to be in the standard mysql format (y-m-d)... function age($date) { if (!$date) return false;...
  3. #2

    Default Re: Problem with an extra .0 added to Datetime field

    try dateformat(left(yourfield), 10)

    Might work, might not.
    Dan Bracuk Guest

  4. #3

    Default Re: Problem with an extra .0 added to Datetime field

    I think I ran into this bug.

    The mySQL driver built-in to ColdFusion is 3.2 or so and is very old. Use the one from [url]www.mysql.com[/url]. It should fix this problem.

    Stephen Dupre
    Macromedia QA
    sdupre Guest

  5. #4

    Default Re: Problem with an extra .0 added to Datetime field

    Thanks Stephen, can you give instructions, or point me the direction of
    instructions on how to use the driver from the MySQL website?

    Also, doesn't this count as a CF bug if it that the driver in CF is simply out
    of date, I mean CFMX7 is a new product and as such should surely come with the
    most up-to-date drivers. Is there a hotfix on the way for this?

    andrewdixon Guest

  6. #5

    Default Re: Problem with an extra .0 added to Datetime field

    Ok, I have found instruction on how to use the JDBC driver, however this made
    no difference still have the same issue. I also tried the MySQL ODBC driver but
    I get the same issue with this as well. Maybe MySQL have changed the format of
    dates!!! Any other ideas?

    andrewdixon Guest

  7. #6

    Default Re: Problem with an extra .0 added to Datetime field

    I have done a little more digging about and it would appear this is a MySQL/W2k3 issue. See [url]http://bugs.mysql.com/bug.php?id=12520&thanks=3&notify=67[/url] for more information.
    andrewdixon Guest

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