vbs獲取當前時間日期的代碼

字號:


    獲取當前日期方法一:
    代碼如下:
    currentdate1=date()
    msgbox currentdate1
    獲取當前日期方法二:
    代碼如下:
    currentdate2=year(now)&-&month(now)&-&day(now)
    msgbox currentdate2
    獲取當前時間:
    代碼如下:
    currenttime=hour(now)&:&minute(now)&:&second(now)
    m = 當前時間& currenttime
    msgbox m