Hi all,
While i was inserting some values at my tables in a mysql server i notice that the value of the datetime field was 0000-00-00 although i have put value (for example 2009-09-10)...Any ideas???:confused:
DateTime Value--> Problem in MySQL
Started by Dreamcatcher, Apr 25 2010 01:55 AM
6 replies to this topic
#1
Posted 25 April 2010 - 01:55 AM
|
|
|
#2
Posted 25 April 2010 - 02:49 AM
don't you need a time as well for the datetime field? try "yyyy-mm-dd hh:mm:ss"
__________________________________________
I study Information Systems at Karlstad University when I'm not on CodeCall
I study Information Systems at Karlstad University when I'm not on CodeCall
#3
Posted 25 April 2010 - 04:46 AM
aha i see...thanks for the advice dude...:)
#4
Posted 25 April 2010 - 04:07 PM
cause there is a date type, a time type and a datetime type...
__________________________________________
I study Information Systems at Karlstad University when I'm not on CodeCall
I study Information Systems at Karlstad University when I'm not on CodeCall
#5
Posted 25 April 2010 - 07:16 PM
aha i see now...with alter commands i change this value from DATETIME to DATE ( because in the specific i need only the Date ) and i works fine... thanks for the advice...
Now i have another question...Can I modify the value of certain column without changing or erasing the other columns?
Now i have another question...Can I modify the value of certain column without changing or erasing the other columns?
Edited by Dreamcatcher, 26 April 2010 - 02:21 AM.
New addition
#6
Posted 27 April 2010 - 12:24 AM
the update clause does this in this format:
UPDATE table SET column='value', col2='val2' WHERE id='x'
__________________________________________
I study Information Systems at Karlstad University when I'm not on CodeCall
I study Information Systems at Karlstad University when I'm not on CodeCall
#7
Posted 27 April 2010 - 07:11 AM
Super thanks alot dude...^^


Sign In
Create Account


Back to top









