Powershell Date Difference Function Sql Syntax For Unique