当前位置: 动力学知识库 > 问答 > 编程问答 >

scripting - How do you convert file date and time stamp (date modified) to minutes in a batch file?

问题描述:

I'm trying to convert date and time stamp found on a file (date modified ) to minutes, e.g. 29/08/2014 12:18 to X amount of minutes.

 name date modified type size

blah 29/08/2014 12:18 txt 1kb

网友答案:

Here is a sample batch file demonstrating how to calculate something within a batch file.

@echo off
set Hour=12
set Minute=18
set /a "Minutes=Hour*60+Minute"
echo Number for minutes for %Hour%:%Minute% is %Minutes%.

For details about command set with option /A enter in a command prompt window either help set or set /? or read documention of command set.

分享给朋友:
您可能感兴趣的文章:
随机阅读: