1. If I insert that into the database do I need to make the table column a $date format?
2. If I want to return that value from the DB does the column/cell need to be a $date format to return a 'partial' date or do I just use a PHP function to only print a partial date?
and...
3. How do I return a partial or differently formatted date then what is saved to the database?
Thanks for the help...
Jr-
a couple questions about the now() function
Moderator: General Moderators
I get kind of confused with this MySQL/PHP stuff, is it something like this (except this doesnt work otherwise I wouldn't be asking).
Code: Select all
$m_query = mysql_query( "e;SELECT * FROM table"e; );
while ( $m_result = mysql_fetch_array($m_query) )
{
$m_date = ($m_resultїm_date]); //Format Date
print "e;$m_date"e;;
}Code: Select all
$m_date = date("m/d/Y", strotime($m_result['m_date']));
echo $m_date;