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 :: php get site metat tags 
Php :: woocommerce check if shop page 
Php :: how to push associative array in php 
Php :: ERROR: Module mpm_event is enabled - cannot proceed due to conflicts. It needs to be disabled first! Considering conflict mpm_worker for mpm_prefork: ERROR: Could not enable dependency mpm_prefork for php7.2, aborting 
Php :: php send values in $_SESSION to other page 
Php :: laravel authentication tutorial 8 
Php :: php sql insert into if not exists 
Php :: Notice: Trying to access array offset on value of type bool in /usr/www/users/easygrb/storage/modification/catalog/controller/startup/startup.php on line 169 
Php :: laravel validation alphanumeric with spaces 
Php :: add taxonomy to custom post type 
Php :: order item add hook WooCommerce admin panel 
Php :: wordpress header.php 
Php :: php hash list 
Php :: db($twoRandomPhotosOfSomePeoples); 
Java :: set size of a jframe 
Java :: how to see list of java of versions in mac 
Java :: jbutton set background transparent 
Java :: how to check if recyclerview is empty 
Java :: spring application properties mysql jpa 
Java :: java hashmap entryset 
Java :: java for loop high to low 
Java :: How to see java versions mac 
Java :: android hide keyboard 
Java :: kill all java processes windows 
Java :: sololearn java shapes coding project 
Java :: Exit program Android 
Java :: How to connect java class file to xml file 
Java :: random number in range java 
Java :: javaee jsp convert int to string 
Java :: java print stacktrace to file 
ADD CONTENT
Topic
Content
Source link
Name
5+3 =