# Add DATEADD and DATEDIFF functions to PI SQL Commander

When any time related functions need to be performed against timestamp columns in PI SQL Commander, one needs to utilize a significant amount of conversions to make this work. For example, if one needs to round timestamps to the nearest minute or the nearest hour, a CASE statement with multiple CASTs needs to be done to get this to work.

If T-SQL DATEADD and DATEDIFF commands were implemented, this would simplify the query by a significant amount. Similarly, in PL/SQL, the ROUND function is able to round the datetime value directly, which would fit perfectly to this scenario.

**12**votes

We are planning to add several functions that are equivalent to T-SQL functions. This will make it easier for the PI SQL products to integrate with the Linked Server in Microsoft SQL Server.