Welcome Guest, Not a member yet? Register   Sign In
[solved] MySQL date manipulation
#3

[eluser]ELRafael[/eluser]
I use TIMESTAMP, for "short" dates (only works 1970 forward)

TIMESTAMP gives me a integer, so i can work easier with it. (add a day, month, hour(s))

and doppo, i still use the date() php function!

Code:
$sql = "SELECT UNIX_TIMESTAMP(datefield) as datefield, * FROM table";

echo date('d/m/Y', $row_returned->datefield);

Of course, birthday date will not work!


Messages In This Thread
[solved] MySQL date manipulation - by El Forum - 10-18-2007, 08:11 AM
[solved] MySQL date manipulation - by El Forum - 10-18-2007, 09:33 AM
[solved] MySQL date manipulation - by El Forum - 10-18-2007, 01:04 PM



Theme © iAndrew 2016 - Forum software by © MyBB