开发者

Date and time batch or delim

开发者 https://www.devze.com 2023-02-07 17:15 出处:网络
What I\'m looking for is a batch file or delim that discovers the current date and time and puts it in different lines in a text file, eg:

What I'm looking for is a batch file or delim that discovers the current date and time and puts it in different lines in a text file, eg:

output of text file:

[date]                  (does not change)
2011/02/01              (new line)
13:34:00                (new line)

Can fin开发者_运维问答d loads of %date% and %time% in batch files but it gives the answer in one line. Help.


You can just echo two lines separately (in batch):

rem This will append the date and time on separate lines
echo The date: %date% >> output.txt
echo The time: %time% >> output.txt
0

精彩评论

暂无评论...
验证码 换一张
取 消