有没有一种方法使用Windows命令来获取划时代的时间? [英] Is there a way to get epoch time using a Windows command?
本文介绍了有没有一种方法使用Windows命令来获取划时代的时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有办法使用Windows命令来获取划时代的时间?如果没有,可以在日期
和时间
命令的输出进行修改?
Is there a way to get epoch time using a Windows command? If not, can the date
and time
commands output be modified?
例如日期
在Windows中给出了/等我想获得一个没有特殊字符,如/输出日期:
For example date
in Windows gives the date with / etc. I would like to get an output that has no special characters such as / :
推荐答案
要得到的时间在年月日的格式,试试这个:
To get time in the "yyyymmdd" format, try this:
for /F "tokens=2-4 delims=/ " %i in ('date /t') do echo %k%i%j
更多关于:
http://www.sprint.net.au/~terbut/ usefulbox / msdoscmds.htm
这篇关于有没有一种方法使用Windows命令来获取划时代的时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文