This moment format dddd, MMMM Do YYYY, h:mm:ss a would be represented as 'l, F jS Y, H:i:s a' in PHP. But, this is not the same as the dddd/mmmm/YYYY H:i:s a format in your PHP, so what does the data received actually look like?
Aug 31, 2022
3
Level 6
Convert Momentjs to Carbon
Hi, i using datetimepicker from jquery with this config (down) to get a date
$(function () {
$('.id_1').datetimepicker({
"allowInputToggle": true,
"showClose": true,
"showClear": true,
"showTodayButton": true,
"format": "dddd, MMMM Do YYYY, h:mm:ss a",
});
and getting (The format i want it) this Wednesday, August 31st 2022, 3:42:35 pm
i want to convert that to carbon date
$format = 'dddd/mmmm/YYYY H:i:s a';
Carbon::createFromFormat($format,$data['start_mission_datetime']) ;
but the format in not right.. and i can find anything
any ideas?
Level 104
Please or to participate in this conversation.