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

format datetime ISO php

$startTime 	= new DateTime($appointment_date . ' ' . $booking_slot[0]); // 2021-12-28 0900
$startTime	= $startTime->format('Y-m-dTH:i:sp'); // 2021-12-25T12:02:00Z
Comment

PREVIOUS NEXT
Code Example
Php :: php remove object from array by property 
Php :: convert text to slug php 
Php :: laravel blade get authenticated user email 
Php :: increase upload limit in phpmyadmin docker 
Php :: create a user using tinker 
Php :: php sort array by key 
Php :: laravel cmd command to watch logs 
Php :: run composer with different php version 
Php :: concat and search in laravel eloquent 
Php :: blade formatting vscode 
Php :: deleteall in cakephp 
Php :: php get object keys 
Php :: WP_DEBUG enable 
Php :: grenerating random text color for text for image php 
Php :: ext-curl install php 7.2 
Php :: php post 
Php :: get random data laravel 
Php :: How To Force Redirect HTTP To HTTPS In Laravel Using htaccess 
Php :: blade set variable 
Php :: publish config laravel 
Php :: Auth log out laravel 
Php :: laravel run a specific migration 
Php :: get table name from model laravel 
Php :: Laravel 9 Clear Cache of Route, View, Config, Event Commands 
Php :: laravel make seeder 
Php :: laravel add item to array 
Php :: laravel websockets onmessage 
Php :: How do I make a redirect in PHP? 
Php :: php start server command 
Php :: laravel get subdomain 
ADD CONTENT
Topic
Content
Source link
Name
3+9 =