Oh, that short form of parameters tricked me! Thanks a lot!
--
Tibor
"Keith Hill [MVP]" wrote:
Quote:
> "Tibor Soos" <TiborSoos@xxxxxx> wrote in message
> news:7AF31D8D-5E86-4F33-851C-A24229FAC765@xxxxxx Quote:
> > Why and how does this work?
> >
> > PS I:\>Get-Date -f MMddyyHHmmss
> > 052708131411
> >
> > Normally the format pattern on the left side of -f, and the expression on
> > the right:
> > PS C:\> "{0:n}" -f 1234567
> > 1 234 567,00
> >
> > But on the example on the top it seems for me that it's the other way
> > around. How does that work?
>
> Get-Date has a -Format parameter that your first example is supplying the
> arg MMddyyHHmmss. In PowerShell you only have to specify enough of the
> parameter name to disambiguate that parameter from any others on the cmdlet.
> So while the two invocations use -F the similarity is only superficial. One
> is a shortened parameter name while the other is a language operator.
>
> --
> Keith
>