Php numeric conversion time and time conversion numerical usage example, php example
This document describes the usage of php numeric conversion time and time conversion value. We will share this with you for your reference. The details are as follows:
Echo $ startime = strtotime (date ("Y-m-d", time (); // returns the timestamp echo "<br/> "; echo $ endttime = strtotime (date ("Y-m-d", time ()). '23:59:59 '); // INT type Timestamp echo "<br/>" at 23:59:59 on the current day; // convert the numeric type to the time struct type $ dotime = "1357985479 "; echo date ("Y-m-d H: I: s", $ dotime); // convert the digital time format to a time grid echo "<br/> "; // output the current time string echo strtotime (date ('Y-m-d H: I: s', time (); echo "<br/> "; // convert the numeric type to string echo date ('Y-m-d H: I: s', '000000'); echo "<br/> "; // convert the string type to the numeric echo strtotime ('Y-m-d H: I: s'); // echo "<br/> "; // echo strtotime ("-7 days") in the last seven days ")
The running result is as follows:
149506560014951519992013-01-12 10:11:1914950734702013-01-12 10:11:191494468670
PS: here we recommend several time and date related tools for your reference:
Online date/day calculator:
Http://tools.jb51.net/jisuanqi/date_jisuanqi
Online date calculator/days calculator:
Http://tools.jb51.net/jisuanqi/datecalc
Online date-days difference calculator:
Http://tools.jb51.net/jisuanqi/onlinedatejsq
Unix timestamp Conversion Tool:
Http://tools.jb51.net/code/unixtime