Welcome Guest, Not a member yet? Register   Sign In
My date when leave blank still save this format in my db:1970-01-01
#4

[eluser]jmadsen[/eluser]
@wondering Coder,

if you use the date formatting on a null value, it will default to 1970-01-01.

Ex.

Code:
echo date('Y-m-d',strtotime(null));

You need to exclude those lines if your user doesn't submit a date


Messages In This Thread
My date when leave blank still save this format in my db:1970-01-01 - by El Forum - 06-19-2011, 11:36 PM



Theme © iAndrew 2016 - Forum software by © MyBB