batch file - CScript:Timestamp since epoch in miliseconds? -


i need current time-stamp in mili-seconds since unix epoch.

i got

wscript.echo datediff("s", "01/01/1970 00:00:00", now()) 

from answer question:

is there way epoch time using windows command?

but doesn't support "ms" first parameter.

is there way above mentioned timestamp in milisecond, using cscript or other method runnable .bat or cscript?

c:\>for /f "tokens=1,2 delims=.," %a in ('powershell get-date -uformat %s') echo %a%b 

if intend use in batch script you'll need double %

or

c:\>powershell [float](get-date -uformat %s)*1000 

Comments