If the $dt parameter contains the DateTime structure and you want to format the date as "year-month-day", use the DateTime.ToString method like this:
$dt.ToString("yyyy-MM-dd")