Dim aDateS = "2005-3-16"
DateE = "2005-8-14"
a = DateDiff("d", DateS, DateE)
Response.Write a

解决方案 »

  1.   

    用ASP就简单多了。
    不知道PHP怎么搞。
      

  2.   

    php 的方法是先变为秒数,然后相减啊,再除以每天的秒数,没有现成的函数
      

  3.   

    echo (strtotime("2005-8-14")-strtotime("2005-3-16"))/60/60/24;
      

  4.   


    <?PHP
    $Date_1="2003-7-15";//也可以是:$Date_1="2003-7-15 23:29:14";
    $Date_2="1982-10-1";
    $d1=strtotime($Date_1);
    $d2=strtotime($Date_2);
    $Days=round(($d1-$d2)/3600/24);
    Echo   "偶已经奋斗了 $Days 天^_^";
    ?>