String to date $ strdate (Y-m-dH: I: s, strtotime (2011-12-12)); echo $ str; Conversion between date rules, for example, 2011-12-1214:23:01 is converted to 2011-12-12 $ dstrtotime (date (Y-m-dH: I: s); echodate (Y-m-dH: I: s ); echobr; echo $ d; ech
String to date $ str = date ("Y-m-d H: I: s", strtotime ("14:23:01"); echo $ str; Conversion between date rules, for example, "14:23:01 is converted to" 2011-12-12 $ d = strtotime (date ('Y-m-d H: I: s ')); echo date ('Y-m-d H: I: s'); echo "/br"; echo $ d; ech
Convert string to date
$ Str = date ("Y-m-d H: I: s", strtotime ("14:23:01 "));
Echo $ str;
Conversion between date rules,
For example, convert "14:23:01 to" 2011-12-12
$ D = strtotime (date ('Y-m-d H: I: s '));
Echo date ('Y-m-d H: I: s ');
Echo"
";
Echo $ d;
Echo"
";
$ T = date ('Y-m-d', $ d );
Strtotime can be converted to a timestamp, which serves as the intermediary for conversion and converts time between different time formats.