【问题标题】:Date and time batch or delim日期和时间批次或分隔符
【发布时间】:2011-02-01 11:38:12
【问题描述】:

我正在寻找的是一个批处理文件或 delim,它发现当前日期和时间并将其放在文本文件的不同行中,例如:

文本文件的输出:

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

可以在批处理文件中找到大量%date%%time%,但它在一行中给出了答案。帮助。

【问题讨论】:

    标签: datetime batch-file


    【解决方案1】:

    您可以分别(批量)回显两行:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-06-07
      • 1970-01-01
      • 1970-01-01
      • 2012-01-01
      • 2015-06-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多