zoukankan      html  css  js  c++  java
  • [学习日记]vb.net里的两个重要的时间函数

    从别人那里看来的,为了方便,放在自己这里,经常会用到的

    函数Dateadd() 
     功能:计算某个指定的时间和 
     格式: dateadd(timeinterval,number,date) 
     参数:timeinterval是时间单位(月,日..); number是时间间隔值,date是时间始点. 
     例子: 
     <% 
     currentDate = #8/4/99# 
     newDate = DateAdd(“m”,3,currentDate) 
     response.write newDate 
     %> <% 
     currentDate = #12:34:45 PM# 
     newDate = DateAdd(“h”,3,currentDate) 
     response.write newDate 
     %> 
     结果: 
     11/4/99 
     3:34:45 PM 
     其中 
     “m” = ”month”; 
     “d” = ”day”; 
     如果是currentDate 格式,则, 
     “h” = ”hour”; 
     “s” = ”second”;
      
     函数Datediff() 
     功能:计算某量个指定的时间差 
     格式: datediff(timeinterval,date1,date2[,firstdayofweek[,firstdayofyear]]) 
     参数: timeinterval 是时间单位; date1,date2是有效的日期表达式,firstdayofweek,firstdayofyear 是任意选项. 
     例子: 
     <% 
     fromDate = #8/4/99# 
     toDate = #1/1/2000# 
     response.write ”There are ” & _ 
     DateDiff(“d”,fromDate,toDate) & _ 
     “ days to millenium from 8/4/99.” 
     %> 
     结果:There are 150 days to millenium from 8/4/99. 
  • 相关阅读:
    Nmap绕过防火墙&脚本的使用
    Nmap在实战中的高级用法
    kali&BT安装好之后无法上网或者无法获得内网IP
    [转]谈渗透测试方法和流程
    xssless
    国内外有名的安全扫描工具,你知道几个?
    Linux下如果忘记了Mysql的root密码该怎么办?
    JSP手动注入 全
    sqlmap用户手册 [详细]
    Windows系统如何使用sqlmap
  • 原文地址:https://www.cnblogs.com/aowind/p/111858.html
Copyright © 2011-2022 走看看