I want to know how I can get the day from a datetime column in sql server, I'm using the funcion DAY but it's giving me the day without the zeros for example:
Column: 2014-08-20 10:28:20.6470000
SELECT DAY(COLUMN) FROM TABLE = 8
SELECT DAY(COLUMN) FROM TABLE = 08
Another option is the Format() if 2012+
I should add, Format() is not know for its performance, but it does have some nice functionality.