79786924

Date: 2025-10-10 00:26:29
Score: 2
Natty:
Report link

This in @orad Comment Jul 28, 2015 at 23:51 but I feel like it should be an answer as well:

$date = Get-Date 
'{0:yyyyMMdd}' -f $date

works.

Specifically 4-digit year, 0-padded 2-digit month and day. The 'M' specifier is capitalized for month to differentiate it from minute which is lowercase 'm'. 2 chars means 0-padded.

See "The following table describes the custom date and time format specifiers..." in this link: https://learn.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings for more specifiers.

Reasons:
  • Blacklisted phrase (1): this link
  • Has code block (-0.5):
  • User mentioned (1): @orad
  • Low reputation (0.5):
Posted by: john v kumpf