Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
I'd like to set the value of a Date field from my custom PHP code.
How can this be made? Which format does the Date field expect when using the setValue() function?
Here's an example value that will set it to today:
'timezone' => 'America/New_York',
'date' => date('m/d/Y')
As always, easiest to find out how it's done by inspecting the fields as they are saved in the control panel.
Required, but never shown