$temp_date = date_create("2013-03-15");
$date_value = date_format($temp_date,"Y/m/d H:i:s");
-- Outputs: 2017/01/23 15:25:45
$temp_date = date_create($yourDate);
$date_value = date_format($temp_date,"l, j F Y");
-- Outputs: Tuesday, 28 February 2017
- Formatting a date variable from one format to another
- Refer to documentation for date format parameters
- Refer to documentation for date format parameters
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.