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

php timestamp to iso8601

$timestamp = '1268932078';

$iso8601 = date('c', $timestamp);
Comment

PREVIOUS NEXT
Code Example
Php :: how to connect database in php 
Php :: get all routes laravel 
Php :: php post form to self 
Php :: php read file line by line 
Php :: laravel migrate fresh and seed 
Php :: php console log 
Php :: laravel description substring 
Php :: composer ignore platform reqs 
Php :: laravel foreach else 
Php :: laravel migation error 
Php :: laravel htaccess tested 
Php :: how to remove notice error in php 
Php :: get am/pm from date in php 
Php :: php password validation preg_match 
Php :: php sum array key 
Php :: php post self 
Php :: file delete in laravel 
Php :: laravel env pgsql 
Php :: php 3 months ago 
Php :: display date time twig 
Php :: php set content type pdf 
Php :: php round down 
Php :: display all errors at once in laravel 
Php :: php remove parentheses and contents from string 
Php :: remove public in laravel hosting 
Php :: comment supprimer balise script hmtl en php regex 
Php :: wordpress featured image as a background image 
Php :: magento 2 get connection 
Php :: var_dump beautify 
Php :: insert php mysql 
ADD CONTENT
Topic
Content
Source link
Name
7+8 =