none
Format date + 1 minute in hh:mm format? RRS feed

  • Question

  • Hi,

    I'd need the date + 1 minute in hh:mm format, this doesn't work:

    $date = (get-date).AddMinutes(1) -format "h:mm"

    Please advise.
    J.


    Jan Hoedt

    Thursday, August 13, 2015 2:13 PM

Answers


  • "{0:HH:mm}" -f (Get-Date).AddMinutes(1)
    


    -- Bill Stewart [Bill_Stewart]

    • Proposed as answer by jrv Thursday, August 13, 2015 2:48 PM
    • Marked as answer by janhoedt Thursday, August 13, 2015 2:49 PM
    Thursday, August 13, 2015 2:16 PM
    Moderator

All replies