A
A
aopil2020-11-20 21:42:55
PHP
aopil, 2020-11-20 21:42:55

How to fix date abbreviation?

I have data as a string: Oct 08, 2020.

How to convert to format: October 08, 2020?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
DevMan, 2020-11-20
@aopil

$date = 'Oct 08, 2020';
$date = DateTime::createFromFormat('M d, Y', $date);
echo $date->format('F d, Y');

L
LaraLover, 2020-11-20
@LaraLover

https://www.php.net/manual/ru/datetime.format.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question