date( f j y ) in php code example Example: php get current time and date date("Y-n-j G:i:s"); //-->2020-10-29 23:27:15