date -- 格式化一个本地时间/日期
说明
string date ( string format [, int timestamp] )
建议楼主查一下php手册先:
http://www.php.net/manual/zh/function.date.php

解决方案 »

  1.   

    不知道楼主的格式化是怎么格式化?
    php有一个Date/Time 日期/时间函数库
    http://cn2.php.net/manual/zh/ref.datetime.php
      

  2.   

    strtotime()计算   date() 格式化
      

  3.   

    建议日期的计算最好转成时间戳进行,然后用date格式化
      

  4.   

    不是吧,这么简单的问题也出来,看看php中文手册吧
      

  5.   

    使用strtotime和dateecho date('Ymd', strtotime('+45 day', strtotime('20060607')));输出 20060722
      

  6.   

    echo strtotime("now"), "\n";
    echo strtotime("10 September 2000"), "\n";
    echo strtotime("+1 day"), "\n";
    echo strtotime("+1 week"), "\n";
    echo strtotime("+1 week 2 days 4 hours 2 seconds"), "\n";
    echo strtotime("next Thursday"), "\n";
    echo strtotime("last Monday"), "\n";
      

  7.   

    <?php
    $tomorrow  = mktime (0,0,0,date("m")  ,date("d")+1,date("Y"));
    $lastmonth = mktime (0,0,0,date("m")-1,date("d"),  date("Y"));
    $nextyear  = mktime (0,0,0,date("m"),  date("d"),  date("Y")+1);
    ?>