Remove date in Datetime from SQL Server GETDATE() Function -


i'm making query fetches records current date regardless of time, how can make on sql server? version of sql server doesn't support date conversion. want format like:

2013-06-20 

so example query is:

select * sometable date = getdate(); 

where getdate() in format 2015-06-19 19:12:10.953. want 2015-06-19 in query.

thanks.

convert(varchar, getdate(), 120) make date iso format, substring date part:

select *  sometable  date = substring(convert(varchar, getdate(), 120), 1, 10) 

Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -