0
I have this date:
<?php echo date("d/M/Y", strtotime($registro['DATA_VENCIMENTO'])); ?>
is showing off like this: 15/Oct/2019
How do I display in English, without losing the formatting I put (d/M/Y)?
I want to show off like this: 15/10/2019
0
I have this date:
<?php echo date("d/M/Y", strtotime($registro['DATA_VENCIMENTO'])); ?>
is showing off like this: 15/Oct/2019
How do I display in English, without losing the formatting I put (d/M/Y)?
I want to show off like this: 15/10/2019
1
In accordance with the documentation, the formatting M
is a representation textual short of the month name (three letters); on the other hand, the formatting m
is the representation numerical of the month, with zero left.
So just change M
for m
:
echo date("d/m/Y", strtotime($registro['DATA_VENCIMENTO']));
Browser other questions tagged php
You are not signed in. Login or sign up in order to post.
tries with setlocale (LC_ALL, 'pt_BR');
– gabrielfalieri
Take a look here: https://answall.com/questions/8317/como-fazer-a-fun%C3%A7%C3%A3o-date-format-a-data-in-Portuguese%C3%Aas
– Bia Silva
They explain how to do but it gets date in full, I cannot lose formatting
– SM_S
Ah, you changed the question... instead of
d/M/Y
, dod/m/Y
, with them
lowercase. It has all possible formatting in the documentation: http://php.net/manual/en/function.date.php– Woss
Thank you! Anderson
– SM_S