Php Date Examples Converting between Julian days and the Gregorian calendar Using the Jewish calendar Using the Julian calendar Using the French Republican calendar Creating a timestamp from the components of a date checkdate.php Converting Human-Readable Dates Into Unix Timestamps Using strtotime() Formatting Characters for the date() Function for Complete Date and Time Formatting Characters for the date() Function for Day Formatting Characters for the date() Function for Hour Formatting Characters for the date() Function for Minute Formatting Characters for the date() Function for Month Formatting Characters for the date() Function for Second Formatting Characters for the date() Function for Year Parsing a date with substr() string date ( string date_format [, int timestamp] ) Setting Time Zones and GMT/UTC Determining Whether a Given Year Is a Leap Year Formatting a Date with date() Format Codes for Use with date() Format date in an array Displaying Human-Readable Dates and Times Get different part of a date Get file name, size, last access time and modified time Greetings based on time Making the date and time appear like we expect Offsets from UTC Outputs the date in the format of 31st of August 2005 number days any month number days current month calculate number days from date Using various formatting strings with date(). Changing time zone with date_default_timezone_set() Handling DST with date_default_timezone_set() Acquiring Date Information with getdate() Return array from getdate( ) The Associative Array Returned by getdate() To obtain a number corresponding to the day of the week, use getdate() insteadgetdate() with a specific timestamp Finding the month, day, and year getservbyname.php Using getservbyname() getservbyport.php Using getservbyport() gettimeofday.php Epoch timestamps and gmmktime() gmmktime and mktime Getting a specific GMT-based epoch timestamp Handling DST with explicit offsets Adjusting time from UTC to another time zone Changing time zone with an environment variable Finding time parts Simple time zone calculation Return array from localtime( ) mixed microtime ( [bool float_output] ) returns a highly accurate reading of the current time Timing with microtime() Calculating the difference between two dates Checking credit card expiration Creating a Timestamp with mktime() Use mktime to create a time Using mktime() and date() int mktime ( [int hour [, int minute [, int second [, int month[, int day [, int year [, int is_dst]]]]]]] ) mktime() produces a GMT timestamp. mktime.php Making an epoch timestamp Get the labor day Checking for the day of the week Format Characters Used by the strftime() Function for Day Format Characters Used by the strftime() Function for Formatting Characters Format Characters Used by the strftime() Function for Full Date and/or Time Format Characters Used by the strftime() Function for Hour Format Characters Used by the strftime() Function for Minute Format Characters Used by the strftime() Function for Month Format Characters Used by the strftime() Function for Second Format Characters Used by the strftime() Function for Week Format Characters Used by the strftime() Function for Year strftime.php Generating the days in a month Generating the days in a week Finding days of the week, month, and year Finding the current date and time Printing a formatted date string with strftime() Printing a formatted time string with other text Printing a greeting or printing a form Skip ahead one day to the Tuesday after the first Monday A simple echo of the timestamp Adding two days to the date Another date interval with epoch timestamps

Php Code : Finding The Current Date And Time

Finding the current date and time in php

 
<?php
print strftime('%c');
print "\n";
print date('r');
?>