The column type is currently set at Date.
That might be the problem right there. Mysql is annoying about how it auto formats some things. Just change it to mediumtext, or something along those lines. (An int setting could work, but then it defaults to 0, and when you get that later, you get jan1, 1970, since that's what it represents as a unix timestamp.)
Just use time() to get the current timestamp (or date(), with no second parameter or input time), and display how you want. But always STORE the unix timestamp, and when you display it, be sure to do so as a date. It hurts nothing if you don't need the hour/min/sec. I did the same thing recently... it's fine.
So.... I'd suggest, for ease of use, making a function, so you can call the formatting easily.
PHP Code:
<?php
function t2d($t) {
return date('M j, Y',$t);
}
//format the date as you want... that gives ex: Jan 1, 1999
///do whatever else you want, including html... etc. etc.
//later, call that function with t2d($time);....
//example:
echo t2d($time);
?>
Bookmarks