I have some user input - for example 150715 - it is supposed to be a date, but I have to change the format of int to datetime -format yyMMdd.
I have tried something like this:
$input = Read-Host "Get number (date)"
$input
$input_toDate = [datetime]$input -format yyMMdd
It doesn't work.
Is it possible to create this?
$input_toDate_up = ($input_toDate).AddDays(5) -Format yyMMdd
[string](unless you cast it to something else).