If you INSERT now() into a timestamp field in a database, is it then stored as a timestamp? I've only done this into a datetime field that stored the value that now() returned as a datetime value. I guess my question is, does MySQL automatically format the value the now() function returns depending on the field type?
yes BUT it is not stored as the timestamp you expect
YYYYMMDDHHMMSS
^ MySQL timestamp format...
FYI, the YYYYMMDDHHMMSS format is what is actually specified in the SQL92/99 standard, anything else is technically an extension.
I was surprised when I saw that. I expected a far more complex definition from the SQL committee.
I store my tyimestamps in integers using the famous now() + 1 but thanks for the background info 😃