Keith, you need to be doing PowerShell seminars. ; )
"Keith Hill [MVP]" <r_keith_hill@xxxxxx_no_spam_I> wrote in message
news:5446D1C0-115E-4CA4-BC28-FF04D4E14F49@xxxxxx
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