View Full Version : help with datetime
megahard
Fri 12th Oct '01, 2:54pm
ok, how do i stick info into a datetime field, then get it back out agen in mysql?
i can do it with all other data, but i get 00-00-00 00:00 etc when i try to use datetime.
Mega
Fri 12th Oct '01, 5:32pm
datetime sucks !
I use a simple strings field and use:
date("U");
To put in the number of seconds since.... (a long time ago :P)
and then you can make any datetime format you want with:
date("d/m/y @ H:i:s",$date);
$date is the string with the date("U") in it.
megahard
Fri 12th Oct '01, 5:47pm
hey thanx that is much better!
i dont even wanna know how PHP calculates this kinda stuff.
vBulletin® v3.8.0 Beta 3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.