PHP Date and Time Function

Admin
0

 


The PHP Date() Function

 Use default timezone set function.

date_default_timezone_set('Asia/Kolkata');

 

use default date and time function.

 echo date("Y-m-d H:i:s");

 

Change date & time format in php

 echo date("H:i d-m-y", strtotime($clas['updated_at']));

 

 

Show Date and Time Control in HTML

 Date display : 

 <input type="date"    name="meeting-time"  >

  Date Time display :

<input type="datetime-local" id="meeting-time"
       name="meeting-time" value="2018-06-12T19:30"
       min="2018-06-07T00:00" max="2018-06-14T00:00">

 

 

 How to change date format in PHP

The PHP Date() Function 

 

 

Need More help Digital Dunia 

Tags

Post a Comment

0 Comments
Post a Comment (0)
Our website uses cookies to fast experience.
Accept !