Jump to content

How Is mysql's date format Y-m-d ?


tibberous

Recommended Posts

I think your ternary operator is a bit confused. There's no condition being evaluated. Unless you meant to compare $data['birthDate'] to $birthDate? In which case, that assignment operator (=) needs to be an equality comparison operator (==), and you need to be assigning the value to a variable (or echoing it, etc).

 

But yes, if your field is a date field, the format is YYYY-MM-DD, so will be generated by date('Y-m-d').

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.