SQL Server equivalent of Trunc

TRUNC(LD.FECHA_CREA) 

I need convert it to SQL Server

2

2 Answers

You can use following condition in your query :

CONVERT(DATETIME, CONVERT(DATE, LD.FECHA_CREA)) = CONVERT(DATETIME, CONVERT(DATE, GETDATE())) 
0

You could use this equivalent in SQL Server:

CONVERT(DATETIME, CONVERT(DATE, LD.FECHA_CREA)); 

Check:

0

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like