Category "varchar"

How to cast a datetime format to date as string in SQL Server

I am struggling to find a solution for the below issue. date1 = 31-08-2017 12:10:00 I want to cast it as string and need to take date (31-08-2017) alone. Th

UNDOCUMENTED FEATURE when SELECT in VARCHAR with trailing whitespace SQL Server

I hope this is an interesting puzzle for an SQL expert out there. When I run the following query, I would expect it to return no results. -- Create a table vari