How to convert the date to French format in email reception ? #3007
Replies: 1 comment 1 reply
-
PHPMailer doesn't have anything to do with this - it just sends whatever you put in the body, so it's up to you. PHP has functions to help process dates though, so you should be able to do something like this: $date = DateTimeImmutable::createFromFormat('Y/m/d', $_REQUEST['date']);
$frenchDate = $date->format('d/m/Y'); Then insert that into whatever you pass into the PHPMailer |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I added a date request in my form :
<input type="date" id="date" name="date" value="" min="2023-01-01" max="2024-12-31" />
But I receive the email with the date in English format (yyyy/mm/dd)
How can I receive the date to the French format (dd/mm/yyyy) in email reception ?
thx
Beta Was this translation helpful? Give feedback.
All reactions