maqskywalker
asked on
subtracting one date from GETDate function in T-SQL
I'm converting a MySQL query to T-SQL
I'm using SQL Server 2019
I have a line of MySQL code like this that subtracts one day from today's date and sets that value to the employee_start_date column.
employee_start_date = (DATE_SUB(CURDATE(), INTERVAL 1 DAY)
What is the equivalent of the above line in T-SQL?
So far I have this:
-- T-SQL code
employee_start_date = CAST(GETDATE() AS date)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER