This topic is locked
[SOLVED]

 Changing Date format

8/21/2018 6:24:07 AM
PHPRunner General questions
S
shoppy author

After adding a new record in the database an email is send to the costumer.

The mail contains the date of the apointment.

That date is like 2018-08-21 00:00 when I do it like this



$message .= 'Youre welcome on '.$values['Datum']. 'blah blah blah';


I used the code that Christian gave in http://asprunner.com/forums/topic/21440-date-format-issue/

but that just gives the current date.



$date = new DateTime($Datum);

$Tijd = $date->format('d/m/Y');
$message .= 'Youre welcome on '.$Tijd. 'blah blah blah';


What am I doing wrong?

admin 8/21/2018
$date = new DateTime($values['Datum']);

$Tijd = $date->format('d/m/Y');
$message .= 'Youre welcome on '.$Tijd. 'blah blah blah';
S
shoppy author 8/22/2018


$date = new DateTime($values['Datum']);

$Tijd = $date->format('d/m/Y');
$message .= 'Youre welcome on '.$Tijd. 'blah blah blah';



Great Sergey, this works.