Skip to content

Instantly share code, notes, and snippets.

@marcothz
Created March 23, 2018 16:07
Show Gist options
  • Select an option

  • Save marcothz/943eeb9c1a25f493b58c1b81b8d78f70 to your computer and use it in GitHub Desktop.

Select an option

Save marcothz/943eeb9c1a25f493b58c1b81b8d78f70 to your computer and use it in GitHub Desktop.

Revisions

  1. marcothz created this gist Mar 23, 2018.
    13 changes: 13 additions & 0 deletions get_formated_datetime.cmd
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    @echo off
    cls
    echo Date format = %date%
    echo dd = %date:~0,2%
    echo mm = %date:~3,2%
    echo yyyy = %date:~6,4%
    echo.
    echo Time format = %time%
    echo hh = %time:~0,2%
    echo mm = %time:~3,2%
    echo ss = %time:~6,2%
    echo.
    echo Timestamp = %date:~6,4%-%date:~3,2%-%date:~0,2%-%time:~0,2%-%time:~3,2%-%time:~6,2%