Customize date and time format – Documentation -
date format Parameters ¶ object Procedural style only: A DateTime object returned by date_create() format The format of the outputted date string
date a live Formatting Numerical Dates · Use a “0” before single-digit days and months as needed · If you're asked to provide the date as MMDDYY you could
DateFormat is for formatting and parsing dates in a locale-sensitive manner It allows the user to choose from a set of standard date time formats as well