-
- $d = Date ("y-m-d h:i:s")
copy code 2, the time format parameter set above syntax "Y-m-d h:i:s", the format is: year-month-day hour: minutes: seconds as long as the corresponding relevant time parameter can be replaced by the time format you want! With a parameter description in PHP time format. A – "AM" or "PM" A – "AM" or "PM" D – a few days, two digits, if less than two digits before 0; such as: "01″ to" 31″d– days of the week, three English letters; such as: "Fri" F – month, English full name; such as: "January" h–12 hours of the hour system; such as: "01″ to" 12″h–24 hours of the hour; such as: "00″ to" 23″g–12 hours of the hour, less than two does not fill 0; such as: "1″ to 12″g–24 hours, less than two not to fill 0; such as: "0″ to" 23″i– minutes; such as: "00″ to" 59″j– a few days, two digits, if less than two bit does not fill 0; such as: "1″ to" 31″l– Day of the week, English full name; such as: "Friday" M – month, two digits, if less than two digits in front of 0; such as: "01″ to" 12″n– month, two digits, if less than two will not fill 0; such as: "1″ to" 12″m– month, three English letters; such as: "Jan" s-seconds; such as: "00″ to" 59″s– and English ordinal, two English letters; such as: "th", "nd" T-the number of days of the specified month; such as: "28″ to" 31″u– total number of seconds W – Number of days of the week, such as: "0″ (Sunday) to" 6″ (Saturday) y – year, four digits; such as: "1999″y– year, two digits; such as: "99″z– the day of the year; For example: "0″ to" 365″ |