Is there away to do this in SQL Server Stored Procedure. I am basically trying to determine full datetime pay period base upon date time now for two weeks using the formula below. It works in code. But I need to do it in a query for a filter purpose. The payperiod variable is 14 days.