convert datetime to string in php

Solutions on MaxInterview for convert datetime to string in php by the best coders in the world

showing results for - "convert datetime to string in php"
Anna
18 Oct 2016
1
2<?php
3$date new DateTime('2000-01-01');
4echo $date->format('Y-m-d H:i:s');
5?>
6
7
Alessandra
12 Apr 2020
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
Max
04 Apr 2016
1phpCopy$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
5
Thibaud
17 Oct 2019
1phpCopy$dateFormat = new DateTime(); // this will return current date
2echo $stringDate = $date->format(DATE_ATOM);
3
4//output: 2020-03-08T12:54:56+01:00
5
Vincenzo
22 Nov 2020
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
Adriana
04 Jan 2017
1phpCopydefine ('DATE_ATOM', "Y-m-d\TH:i:sP");
2define ('DATE_COOKIE', "l, d-M-y H:i:s T");
3define ('DATE_ISO8601', "Y-m-d\TH:i:sO");
4define ('DATE_RFC822', "D, d M y H:i:s O");
5define ('DATE_RFC850', "l, d-M-y H:i:s T");
6define ('DATE_RFC1036', "D, d M y H:i:s O");
7define ('DATE_RFC1123', "D, d M Y H:i:s O");
8define ('DATE_RFC2822', "D, d M Y H:i:s O");
9define ('DATE_RFC3339', "Y-m-d\TH:i:sP");
10define ('DATE_RSS', "D, d M Y H:i:s O");
11define ('DATE_W3C', "Y-m-d\TH:i:sP");
12
queries leading to this page
str to datetime phpphp convert date to stringtotimephp object writing formatateget datetime to string phpdate to str in phpconvert datetime object to string phptime to string in phpfrom date to datetime phpdatetime from format phpphp date string to date objectphp formatformat phpconvert a date into string in phpphp convert datetime object to stringphp datetime format c3 8a c3 a1 c3 b4 c3 a1 c3 b7 c3 be c3 b1 c3 a7 c3 b3 c3 a7 c3 90 c3 a1 c3 b1 c3 a1 c3 a3 c3 a3 c3 a5 c3 ab c3 9f c3 a1 c3 b2 c3 ac c3 a5 c3 a1 c3 b1 c3 a9 c3 a8 c3 ac c3 bc format phpformat in phpphp convert date to datetimephp datetime object formatsphp formate date timephp date typedate time object to string phpdatetime format phpphp datetime 2f to date to strftime phpphp ojbject to string format outputdatetime object to string phpphp convert datetimephp datetime format why i change datetime to string phpphp datetime format to string24 hrs format in time date datetime phpphp datetme to stringphp date time formatmysql string to timestampnew date to string in phpconvert date to str phpphp conversion date to stringconvert time into string phpdate to string in phpphp convert datetime to string formatphp datetime to sringphp date convert to stringformat utc datetime phpphp new datetime to stringdate object to string phpphp date to string for namephp datetime format hours and minutesphp datetime to datedatrtime to string phpphp formate to datetimeconvert datetime to string in phpweek php objectphp used date db change format to onlu datedate time to string in phpto string date phpdate 28 29 to string phpphp get date from datetime to stringdatetime php to stringconvert time to string in phpphp date string to other formatphp datetime mtime formathow to convert datetime to string phpphp date with time to stringphp parse datetime to stringdatetime to string in phpdate to string convert phpphp time to string formatdatetime to string en phpdatetime to datestring phpphp parse dateinterval to stringphp datetime to string examplesdatatime object into string phplaravel datetime to stringphp date time to datephp calendar str format codedate time object to date strign phpconvert date string into format phpphp datetime to string formatconverting date to string in phpphp convert string date to string datephp string date formatchange format of time phpget time in t datetime format phpconvert date and tome to string phpconvert date into string in phpecho datetime phpdatetime y m dconvert date time to string phpphp convertir string a datetimereformate date from string to another view string ih php c3 8a c3 a1 c3 b4 c3 a1 c3 b7 c3 be c3 b1 c3 a7 c3 b3 c3 a7 format phpphp date formattingchange date to string phpcall format on string php datephp string date to strftimestring date to datetime phpdate convert to string phpphp datetime tostringtime to string converter phpphp current date to stringphp get string date from date objectphpdatetime to stringdate php formatphp code to convert date to stringdatetime example phpdatetime to string pythonphp time 280 to stringphp dateime to stringconvertir datetime a string en phpconvert datetime php to stringconvert date into string phpphp datetime from stringhow to change dates to string in phpconvert php datetime to stringdatetime php formphp convert date value to stringhow to format phpparse date to string phpconvert datetime phpphp date time object to stringphp datetime ti stringconvert date to string phpreturn as date timeformatephp date as stringforamt phpphp formatted datetime to datetimephp tostring datetimeget date from datetime object in phpcast date to string phphow to convert date object to string in phpphp datetime to date and timephp date object to stringnew datetime 28 29 to stringphp convert date to strinobject datetime to string phpphp date to stringcarbon 3a 3acreatefromformat 28 24format 2c 24time 2c 24tz 29php get date to stringdate converter to string phpformat phpphp convert datetime to stringconvert php date to stringphp formarphp dateformatdatetime to str phpphp datetime y m d h i snew datetime php to stringphp datetime object to stringphp mysql datetime to stringconvert date php to stringdate to string phpphp datetime format why i used for minutenew datetime format phpdatetime drfault format phphow to convert date to string in php php date and time to stringphp format datetimeparse dattime to string phpphp datetime to stringdatetime to string php no timephp date time strngphp datetime formattingphp datetimedate to minutes phpdate php to stringphp convert dateperiod item to datehow to change datetime to string phpy m d format date from php datetime objphp time to stringphp time 28 29 to stringconvert current datetime to string phpdate to str phpdatetimr format phpdatetime to string phpconverting date time to string phpphp datetime format h 3ai without scecondsdatetime object to string in phpdate time php formatphp to string datephp dateinterval to stringnew datetime formatconvert datetime to string phpphp date to string 281 2f1 2f1 29convert date type to string phpconvert to datetime string phpdatetime from string phpfro integer to date in string format phpdatetime string php 5cdate object from string phpphp how to convert time to stringphp format string dateconvert date to string in phpchange date time to string phpphp dateto stringfrom date object to string phpchange datetime object to string phpdatetime object to string en phpphp convert date to stringphp date formatphp from date to string time to string convert in phpdate time format in phpformat string date phphow to make date to string in phpconvert date and tome to string to time phpformatter function phpphp date time to stringformat date from string phpis php date output a stringhow to convert date to string in phptime to string phpconvert date now to string phpconvertir un string en date phphow do i convert datetime to string format in phpconvert time to string phpconvert php time 28 29 to stringphp current datetime to stringphp datetime to string formartconvert a datetime object php to stringphp display date formatphp date format from stringphp convert time to stringphp convert sql date to stringhow to convert date into string phpget date to string phpconvert datetime object to string php 5cphp print date in formatconcert current datetime to string in phphow to convert date data type to string in phpphp format an objectphp datetime as stringphp convert date time to stringconvert datetime to string in php