MySQL Now() Function Problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • gw

    #1

    MySQL Now() Function Problem

    I am new to MySQL and my problem is with storing a datetime value in a
    table. I created a table with a column designated as DATETIME. I
    fill it with the NOW() function. No matter whether I default it or
    try and set with code, all I get is a date! Even running "SELECT
    Now()" only returns a date.

    If I run the following query:

    Date_Format(now (), GET_FORMAT(DATE TIME,'USA'))

    it returns a datetime value. However, if I use that SAME query to try
    and fill the column during insert, I still get only a date value.

    I've even tried some date calculations like Now() + 0 but still get
    ONLY a date, no time info.

    Version: 4.1.4-gamma

    Any ideas?

    Thanks,
    GW
Working...