vbs獲取當(dāng)前時(shí)間日期的代碼

字號(hào):


    這篇文章主要介紹了vbs獲取當(dāng)前時(shí)間日期的代碼,需要的朋友可以參考下
    獲取當(dāng)前日期方法一:
    代碼如下:
    Currentdate1=date()
    msgbox Currentdate1
    獲取當(dāng)前日期方法二:
    代碼如下:
    Currentdate2=year(Now)&"-"&Month(Now)&"-"&day(Now)
    msgbox Currentdate2
    獲取當(dāng)前時(shí)間:
    代碼如下:
    CurrentTime=Hour(Now)&":"&Minute(Now)&":"&Second(Now)
    m = "當(dāng)前時(shí)間"& CurrentTime
    msgbox m