Postgresql Loop Through Array Powershell Get Date