日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
幾種常用VB.NET時間函數(shù)介紹

對于VB.NET中的函數(shù),在學(xué)習(xí)的過程中需要從各個方面去進行日常的經(jīng)驗積累,才能方便我們?nèi)蘸笫褂?。在這里就先為大家介紹兩種常用的VB.NET時間函數(shù),方便大家參考學(xué)習(xí),增加自己對VB.NET編程的理解。#t#

VB.NET時間函數(shù)之函數(shù)Dateadd() 

功能:計算某個指定的時間和 

格式: dateadd(timeinterval,number,date) 

參數(shù):timeinterval是時間單位(月,日..); number是時間間隔值,date是時間始點. 

例子: 

 
 
 
  1. < %    
  2. currentDate = #8/4/99#    
  3. newDate = DateAdd
    (“m”,3,currentDate)    
  4. response.write newDate    
  5. %>   
  6. < %currentDate = 
    #12:34:45 PM#    
  7. newDate = DateAdd
    (“h”,3,currentDate)    
  8. response.write newDate    
  9. %>   

結(jié)果: 
11/4/99 
3:34:45 PM 
其中 
“m” = ”month”; 
“d” = ”day”; 
如果是currentDate 格式,則, 
“h” = ”hour”; 
“s” = ”second”;
 
VB.NET時間函數(shù)之函數(shù)Datediff() 

功能:計算某量個指定的時間差 

格式: datediff(timeinterval,date1,date2[,firstdayofweek[,firstdayofyear]]) 

參數(shù): timeinterval 是時間單位; date1,date2是有效的日期表達式,firstdayofweek,firstdayofyear 是任意選項. 

例子: 

 
 
 
  1. < %fromDate = #8/4/99#    
  2. toDate = #1/1/2000#    
  3. response.write ”There 
    are ” & _    
  4. DateDiff(“d”,fromDate,
    toDate) & _    
  5. “ days to millenium 
    from 8/4/99.”    
  6. %>   

結(jié)果:There are 150 days to millenium from 8/4/99. 


標題名稱:幾種常用VB.NET時間函數(shù)介紹
轉(zhuǎn)載注明:http://www.5511xx.com/article/cosodgo.html