convertir datetime a string en php

Solutions on MaxInterview for convertir datetime a string en php by the best coders in the world

showing results for - "convertir datetime a string en php"
Debora
17 Jun 2018
1$theDate    = new DateTime('2020-03-08');
2echo $stringDate = $theDate->format('Y-m-d H:i:s');
3
4//output: 2020-03-08 00:00:00
Filippo
16 Feb 2017
1phpCopy$theDate    = new DateTime('2020-03-08');
2echo $stringDate = $theDate->format('Y-m-d H:i:s');
3
4//output: 2020-03-08 00:00:00
5
Anna
04 Oct 2020
1$date = date_create_from_format('d M, Y', '08 Mar, 2020');
2echo $newFormat = date_format($date,"Y/m/d H:i:s");
3
4//output: 2020/03/08 00:00:00
Ilaria
21 Nov 2018
1$dateFormat = new DateTime(); // this will return current date
2echo $stringDate = $date->format(DATE_ATOM);
3
4//output: 2020-03-08T12:54:56+01:00
Francesco
12 Jan 2019
1$date = explode("/",date('d/m/Y/h/i/s')
2list($day,$month,$year,$hour,$min,$sec) = $date);
3echo $month.'/'.$day.'/'.$year.' '.$hour.':'.$min.':'.$sec;
4
5//output: 03/08/2020 02:01:06
Erika
25 Aug 2018
1phpCopy$date = explode("/",date('d/m/Y/h/i/s')
2list($day,$month,$year,$hour,$min,$sec) = $date);
3echo $month.'/'.$day.'/'.$year.' '.$hour.':'.$min.':'.$sec;
4
5//output: 03/08/2020 02:01:06
6
queries leading to this page
convertir un string en date phpphp date to string for namedatetime to string phpphp datetime stringphp date convert to stringstring datetime phpdate to string phpnew datetime from string phpphp datetime in stringdatetime from string phphow to change dates to string in phptime from date string function in phpphp convert time to stringconvert php datetime to stringconvert php date to stringphp date object to stringphp string datetimephp new datetime to stringphp convert datetime to stringconvert datetime to string in phpphp convert letteral string date to dateconvert date to string phpconvert datetime in strtostring phpdatetime string phpconvertir un date a string phpdatetime php de un stringdate time object to string phphow to convert date to string in php php convert date to stringdate to str phpphp convert dateinterval to stringdate time to string in phpchange date format to string phpchange date to string phpconvert to datetime string phpphp convert datetime to string formatconverter datetime para string phpdates as string phpconvert date into string in phpphp datetime from stringdate into string phphow to get datetime as string in phpphp new datetime from stringphp datetime ti stringphp convert sql date to stringhow to convert date data type to string in phpcreate datetime string phppasar datetime a string phpconvertir datetime a string en phpphp pasar string a datedatetime php stringphp datetime format to stringhow to convert date object to string in phpdate converter to string phpphp get date from datetime to stringconvert datetime to string phpphp from date to string change datetime to string phpphp parse datetime to stringphp parse dateinterval to stringconvertir une date en string phpconvert datetime object to string phpphp date to stringphp datetime to stringdatetime to string en phpdate 28 29 to string phpphp date time to stringparse date to string phpget datetime to string phpphp convert string date to string datephp datetime object to stringphp mysql datetime to stringfro integer to date in string format phpdate function with sttotime in phpmake datetime from stirng phpdate time to string phpconvertir datetime a string en php