Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php convert date and time to iso 8601

//Object Oriented Method

$datetime = new DateTime('2010-12-30 23:21:46');

echo $datetime->format(DateTime::ATOM); // Updated ISO8601


//Procedural Method

echo date(DATE_ISO8601, strtotime('2010-12-30 23:21:46'));
Comment

datetime iso 8601 php

(new DateTime('2022-05-01T16:00:00-03:00'))->format('Y-m-dTH:i:sp');
Comment

PREVIOUS NEXT
Code Example
Php :: generate slug on create laravel 
Php :: convert an integer to a string in PHP 
Php :: dynamic base url codeigniter 
Php :: laravel select selected 
Php :: laravel spatie asigne role 
Php :: php foreach string in array 
Php :: how to use join in laravel 5.4 
Php :: how to use xampp for php and mysql 
Php :: php echo new line terminal 
Php :: search query in laravel 
Php :: laravel validation array input 
Php :: Laravel adding Foreign Key Constraints 
Php :: model get last query in php 
Php :: php add element to array 
Php :: php collection to array 
Php :: return view with variable laravel 
Php :: laravel multiple group by 
Php :: int to char php 
Php :: get ip address of client php 
Php :: laravel select multiple value in form edit 
Php :: instal phpgd2 
Php :: model with migration laravel 
Php :: php artisan create controller inside folder 
Php :: wordpress add meta user 
Php :: in_array php 
Php :: insert key-value pair into array php 
Php :: time function in php 
Php :: loop foreach laravel with number 
Php :: laravel get current route url 
Php :: how to fetch data from url in php properly 
ADD CONTENT
Topic
Content
Source link
Name
1+6 =