vb顯示當(dāng)前年月日 VB中如何獲取日期時(shí)間?
VB中如何獲取日期時(shí)間?您可以使用now(),但只能獲取當(dāng)前時(shí)間,如果要與系統(tǒng)時(shí)間同步,則需要使用計(jì)時(shí)器()獲取系統(tǒng)時(shí)間:print date“date”print time“time”print n
VB中如何獲取日期時(shí)間?
您可以使用now(),但只能獲取當(dāng)前時(shí)間,
如果要與系統(tǒng)時(shí)間同步,則需要使用計(jì)時(shí)器()獲取系統(tǒng)時(shí)間:
print date“date”
print time“time”
print now“date and day”
print format(now,“yyyy year MM DD hh MM min SS sec”
]print year(now)“年”
打印月(現(xiàn)在)“月”
打印日(現(xiàn)在)“日”
打印小時(shí)(現(xiàn)在)“小時(shí)”
打印分鐘(現(xiàn)在)“分鐘”
打印秒(現(xiàn)在)“秒”
私有子窗體load()
text1.text=year(now)
text2.text=month(now)
text3.text=day(now)
text4.text=hour(now)
text5.text=minute(now)
text6.text=second(now)
end sub。