469,081 Members | 1,892 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,081 developers. It's quick & easy.

MySQL Now() Function Problem

gw
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(DATETIME,'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
Jul 20 '05 #1
0 1792

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by dohnut | last post: by
reply views Thread by Lenz Grimmer | last post: by
reply views Thread by Mike Chirico | last post: by
3 posts views Thread by Kirk Soodhalter | last post: by
175 posts views Thread by Sai Hertz And Control Systems | last post: by
6 posts views Thread by TonyB | last post: by
1 post views Thread by CARIGAR | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.