I am trying to find current quarter of year in PowerShell to append in a filename with format yyyyqq.
yyyyqq
I have already got current month and week as below
Another way:
$today = Get-Date $YearYYYYQQ = "{0}{1:d2}" -f ($today.Year, [int][math]::Ceiling($today.Month/3))