我如何获得日期 &时间 (VBS) [英] How do I get the Date & Time (VBS)

查看:44
本文介绍了我如何获得日期 &时间 (VBS)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用 VBS 获取当前日期和时间(对于 Windows.我不是在寻找 ASP/ASPX 或网页的 VBScript).

How do I get the current date and time using VBS (for Windows. I'm not looking for VBScript for ASP/ASPX or webpages).

推荐答案

要阐述 Numenor 的答案,您可以执行以下操作:格式(Now(),"HH:mm:ss")使用这些自定义日期/时间格式选项

To expound on Numenor's answer you can do something like, Format(Now(),"HH:mm:ss") using these custom date/time formating options

对于那些想对这个答案投反对票的人,请注意这个问题最初被标记为 VB 和 vbscript,因此我的回答是,VB 标记被删除,只留下了 vbscript 标记.OP接受这个答案,我认为这给了他所需的信息.

For everyone who is tempted to downvote this answer please be aware that the question was originally tagged VB and vbscript hence my answer, the VB tag was edited out leaving only the vbscript tag. The OP accepted this answer which I take to mean that it gave him the information that he needed.

这篇关于我如何获得日期 &时间 (VBS)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆