Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo


Formatted DATE output

  • Sami SAHIN
    Sami SAHIN

    I think that DOS Command line has a major problem for getting formatted DATE output. It is totally dependent of the regional settings of the machine. To use formatted day, month, year, hour, minute, second or milisecond values in batch script is possible, but the batch file is not portable between different regional settings.

    So creating a line in a batch script like the one below can solve the problem temporarily and only in that regional zone which the OS is operating under.

    set today=%date:~10,4%-%date:~4,2%-%date:~-7,2%

    I hoped that SFK is able to overcome this simple problem but I see that it hasn't got any formatted date output functions. It would be great if it had a function to get formatted date output.

  • stahlworks

    You may try

    sfk time -h

    and give feedback if it is useful.
    It's an inofficial function so far, and the syntax may change.