How to Get the Date from Datetime in Mssql

This is how you will get the Date object from DateTime

SELECT CONVERT(nvarchar(20), GETDATE(), 23) AS DateOnly

For more MSSQL Convert Codes you can refer here:
http://www.dbforums.com/microsoft-sql-server/1621868-what-format-codes-mean-sql-convert.html

0 Comments

Post a Comment

Post a Comment (0)

Previous Post Next Post
NERV Open Source
Building production Spring Boot systems?

Explore NERV — open-source Java libraries for audit trails, persistence, exception handling, and reliable event-driven architecture.