龍巖易富通網(wǎng)絡(luò)科技有限公司

龍巖小程序開發(fā),龍巖分銷系統(tǒng)

時(shí)間格式轉(zhuǎn)換問題

2015.09.10 | 51閱讀 | 0條評(píng)論 | 未命名

最近將一個(gè)網(wǎng)站的mssql數(shù)據(jù)庫(kù)導(dǎo)入到phpcms的mysql中,mssql數(shù)據(jù)庫(kù)中時(shí)間格式為2004-3-1 16:58:00,導(dǎo)入到mysql格式為1265264139。 通過strtotime() 函數(shù)將任何英文文本的日期時(shí)間描述解析為 Unix 時(shí)間戳。 [php] <?php echo(strtotime("now")); echo(strtotime("3 October 2005")); echo(strtotime("+5 hours")); echo(strtotime("+1 week")); echo(strtotime("+1 week 3 days 7 hours 5 seconds")); echo(strtotime("next Monday")); echo(strtotime("last Sunday")); ?> [/php]

贊 (

發(fā)表評(píng)論