I have a custom table with a DATETIME column. I have a function to add records; I would like to add an $expires argument to this function which can hold a unix timestamp noting when the record should expire. I would like to use $wpdb->insert() to populate this column. So far I've been unable to find a WordPress convenience function to massage the timestamp into 'YYYY-MM-DD HH:MM:SS' format. Is there such a builtin, or should I just use $wpdb->prepare(), or possibly a third option?
Tell me more
×
WordPress Answers is a question and answer site for
WordPress developers and administrators. It's 100% free, no registration required.
|
|
|||
|
|
|
Couldn't you just use PHP's
|
|||||||
|