syntax of day function:
select day(datevalue) ;
select day('09-20-2014') returns 20 as day number ( assuming sql server is configured for mm-dd-yyyy format as default format ) . For more details See Change Date format in sql