Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php get current date and time

$today = date("F j, Y, g:i a");   // October 30, 2019, 10:42 pm
$today = date("D M j G:i:s T Y"); // Wed Oct 30 22:42:18 UTC 2019
$today = date("Y-m-d H:i:s");     // 2019-10-30 22:42:18(MySQL DATETIME format)
Comment

php today date

<?php
echo "Today is " . date("Y/m/d") . "<br>";
echo "Today is " . date("Y.m.d") . "<br>";
echo "Today is " . date("Y-m-d") . "<br>";
echo "Today is " . date("l");
Comment

How to get the current date in PHP?

<?php
 $date = date('Y-m-d H:i:s');
 echo $date;
 ?>
Comment

get today date in php

<?php
  echo "Today's date is :";
  $today = date("d/m/Y");
  echo $today;
?>
Comment

php current date get

date_default_timezone_set('Asia/Kolkata'); 
echo date("Y-m-d H:i:s"); // time in India
Comment

php current date

# Current date
date_default_timezone_set('Asia/Kolkata'); 
echo date("Y-m-d H:i:s"); 

# Current Time
date_default_timezone_set("America/New_York");
echo "The time is " . date("h:i:sa");
Comment

get today datetime in php

$today = date("Y-m-d H:i:s");
Comment

Get the Current Date and Time in PHP

phpCopy<?php
$Object = new DateTime();  
$DateAndTime = $Object->format("d-m-Y h:i:s a");  
echo "The current date and time are $DateAndTime.";
?>
Comment

php get current time and date

date("Y-n-j G:i:s");
//-->2020-10-29 23:27:15
Comment

Get the Current Date and Time in PHP

phpCopy<?php
$DateAndTime = date('m-d-Y h:i:s a', time());  
echo "The current date and time are $DateAndTime.";
?>
Comment

How do I get the current date and time in PHP?

//Your Country Time Zone: https://www.php.net/manual/en/timezones.php

date_default_timezone_get(Asia/Dhaka);

$dateYmd = date('Y-m-d');
echo "Current Year Month Day: $dateYmd";
//Current Year Month Day: 2022-01-14

$datehms = date('h:i:s');
echo "Current Hour Minute Second: $datehms";
//Current Hour Minute Second: 10:33:58
Comment

Get the Current Date and Time in PHP

phpCopy<?php
date_default_timezone_set('Europe/Amsterdam');    
$DateAndTime = date('m-d-Y h:i:s a', time());  
echo "The current date and time in Amsterdam are $DateAndTime.
";
date_default_timezone_set('America/Toronto');    
$DateAndTime2 = date('m-d-Y h:i:s a', time());  
echo "The current date and time in Toronto are $DateAndTime2.";
?>
Comment

Get the Current Date and Time in PHP

phpCopy<?php
$Object = new DateTime();  
$Object->setTimezone(new DateTimeZone('Europe/Amsterdam'));
$DateAndTime = $Object->format("d-m-Y h:i:s a");  
echo "The current date and time in Amsterdam are $DateAndTime.
";
$Object->setTimezone(new DateTimeZone('America/Toronto'));
$DateAndTime = $Object->format("d-m-Y h:i:s a");  
echo "The current date and time in Toronto are $DateAndTime.";
?>
Comment

php get current date

angular js tabs
  
Comment

PREVIOUS NEXT
Code Example
Php :: post thumbnail 
Php :: laravel faker boolean 
Php :: convert multidimensional array into single dimension php 
Php :: create guid in php 
Php :: db connection postgres laravel 
Php :: php detect mobile 
Php :: qual é a melhor linguagem de 
Php :: laravel collection get price sum 
Php :: moodle webservice create user phone2 
Php :: laravel current timestamp 
Php :: carbon add days 
Php :: how to check if input is number only in php 
Php :: delete record php mysqli 
Php :: rtl file manager laravel 
Php :: blade capitalize first letter 
Php :: how change default value for enum colun in laravel 
Php :: phpmyadmin import size limit 
Php :: pathtophp in ubuntu lampp in moodle 
Php :: sort multi array php 
Php :: please provide a valid cache path. laravel 
Php :: php get file type from url 
Php :: get file name from file path in php 
Php :: laravel dusk run failed tests 
Php :: copy php array to javascript 
Php :: access config variable in codeigniter controller 
Php :: php mb_convert_case 
Php :: asset not working in laravel 
Php :: php remove everything after a specific character 
Php :: laravel add timestamps to existing table 
Php :: wordpress single post get category name 
ADD CONTENT
Topic
Content
Source link
Name
4+4 =