天天看點

ASP.NET

<%@Page Language="VB" ContentType="texthtml" ResponseEncoding="gb2312"%>

<html>

<head>

<title>時差

</title>

</head>

<body>

<%

  Dim rg ,a,c as Date

  rg=now()

  c=today()

  a=c.adddays(1)

  %>

  <table width="200" border="5" cellpadding="5" cellspacing="5" align="center"   bordercolor="#CC66FF">

  <tr>

    <td><p align="center">現在是<%=rg%></p></td></tr>

   <tr>

<td><p align="center"></p></td></tr>

    <tr>

  <td><p align="center"></p></td></tr>

<td><p align="center">與明天0點相差的時間是<%=DateDiff(dateinterval.hour,rg,a)%></p></td></tr>

   </table>

</body>

</html>