Level 122
You have to apply a day (with concatenation)
$model->mydate = $request->date . '/01';
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi,
I have a date picker on my form that allows users to select a month and year. The value is submitted as YYYY/MM. How can I update the value so that I can save it in a mysql date field?
Please or to participate in this conversation.