Remove the time from a DATETIME

I’ve seen alot of questions around the internet about how to remove the time portion from a date. I’ve provided two ways of doing this below that you can use.The first uses a CONVERT method, however, CONVERT is Microsoft SQL Server function meaning that it will not port to another database server such as MySQL. So the second example is one that uses CAST, which will port to other database servers as its an ANSI standard.Personally, I use the CONVERT method in my day job as it’s the standard that we use, I suggest that you follow your workplace standards too, if there aren’t any, you can lead the way and make them!