1$today = date("F j, Y, g:i a"); // October 30, 2019, 10:42 pm
2$today = date("D M j G:i:s T Y"); // Wed Oct 30 22:42:18 UTC 2019
3$today = date("Y-m-d H:i:s"); // 2019-10-30 22:42:18(MySQL DATETIME format)
1// Change the line below to your timezone!
2date_default_timezone_set('Australia/Melbourne');
3$date = date('m/d/Y h:i:s a', time());
4
1$date_input = '2003';
2$date_output= date( "Y-m-d", mktime( 0, 0, 0, 1, 1, $date_input ));
3//date_output = 2003-01-01