0

I can run this command on my Mac:

exp=$(date -v+8760H +"%Y-%m-%dT%H:%M:%SZ")

I then run: echo $exp and it produces the desired result i.e. 2021-04-20T09:06:44Z

I then modified the command to run it on a Linux box:

exp=$(date -d '+8760 hour' +"%Y-%m-%dT%H:%M:%SZ")

I also need to run this command on a Windows 10 box. What is the command for Windows? I have managed it on Linux and Mac, but not Windows.

2
  • You probably have your reasons for doing this, but not knowing them may hinder our helping you. I know what curiosity did to the proverbial cat, but this is beyond cryptic IMO... :-)
    – user1019780
    Commented Apr 20, 2020 at 9:26
  • Here is a starting point for you Date Math - Add or subtract days - Windows CMD - SS64.com
    – DavidPostill
    Commented Apr 20, 2020 at 11:00

0

You must log in to answer this question.

Browse other questions tagged .