formatting date time php

Format a PHP date for a given format

You will need some formatting for php date strings when you echo them or populating to db and other functions as well. You can first convert that accurate string to DateTime field in php and then format can be applied. Check below example.