Convert date to string with specific format

[datetime]$date = Get-Date
$date.ToString('yyyy-MM-dd')
Details
See the section on working with dates and times for more on this topic

Example
PS C:\> [datetime]$date = Get-Date
>> $date.ToString('yyyy-MM-dd')

2019-03-28