In
this case %Y represents a four-digit year such as 2007, %M represents a two-digit month
such as 09, and %d represents a two-digit day such as 21.
NOTE For this particular switch cmdlet, the date formatters are case-sensitive. %Y is very different
from %y, so be careful to use the correct case.
456 Microsoft Windows Server 2008 Administration
The following list shows some of the potential values you can use. Remember that
you must prefix each character with the percent (%) sign in order for them to work, and
remember that case is very important.
?–? C (capital C) Century of the year. It uses the first two digits of the year, such
as 20 for 2007.
?– Y
Four-digit year
?– y
Two-digit year
?– b
Abbreviated month name
?– B
Full month name
?– M
Two-digit month
?– W
(capital W) Week of the year (00??“52)
?– V
(capital V) Week of the year (01??“53)
?– a
Abbreviated day of the week
?– A
Full day of the week
?– u
Day of the week as a number starting with 1 for Monday
?– d
Two-digit day of the month
?– j
Day of the year
?– r
Time in 12-hour format
?– R
Time in 24-hour format (no seconds)
?– T
Time in 24-hour format
?– p
a.m. or p.m.
?– Z
(capital Z) Timezone offset from UTC
?– H
Hour in 24-hour format
?– I
Hour in 12-hour format
?– m
Minutes
?–? S (capital S) Seconds
Calculating dates is another one of those useful date and time functions.
Pages:
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489