Tue. Jun 7th, 2022
Function GetTimeStamp()
{
    if((Get-Date).Month -le 10)
    {
        $curMonth = "0" + $((Get-Date).Month)
    }else
    {$curMonth = $((Get-Date).Month)}

    if((Get-Date).Day -le 10)
    {
        $curDay = "0" + $((Get-Date).Day) 
    }else
    {$curDay = $((Get-Date).Day)}

    $CurrentTime = Get-Date -UFormat %R 
    $CurrentTime = $CurrentTime -Replace ":","-"

    $Timestamp = "$curDay-$curMonth-"+(Get-Date).Year+" "+$CurrentTime
    return $Timestamp
}

This website uses cookies. By continuing to use this site, you accept our use of cookies.