Issue with DATETIME
Posted: Fri Mar 07, 2003 3:32 am
Im sorry to be a pain, but once again this haunts me.
Im trying to insert a DATETIME into a mySQL database, however everytime I put one it in comes up either a stupid date, or 0000-00-00 :00:00:00
Tried this...
Tried this...
And this...
and this...
I can get dates out and sort them, but i need to get them into the database as a DATETIME.
I've tried converting the string to time, converting it into a UNIX timestamp, and even a string "1980-10-23 00:00:00" and nothing works.
I can put a date in using myPhpAdmin but the code it uses looks like a string.
Can anyone help?
Cheers,
SteJ.
Im trying to insert a DATETIME into a mySQL database, however everytime I put one it in comes up either a stupid date, or 0000-00-00 :00:00:00
Tried this...
Code: Select all
list($month, $day, $year) = split('ї/.-]', $member_date_of_birth);Code: Select all
$member_date_of_birth = ("12/Jun/2002:01:02:26");Code: Select all
mktimeCode: Select all
strtotimeI've tried converting the string to time, converting it into a UNIX timestamp, and even a string "1980-10-23 00:00:00" and nothing works.
I can put a date in using myPhpAdmin but the code it uses looks like a string.
Can anyone help?
Cheers,
SteJ.