Question : Get only Day and month from datetime

Hello, how do you extract just the day and the month from a datetime field?

Answer : Get only Day and month from datetime

Try this :

SELECT CAST(DAY(GETDATE()) AS VARCHAR(2)) + ' ' + DATENAME(MM, GETDATE()) AS                                                                                            [DD Month]

SELECT DATENAME(MM, GETDATE()) + ' ' + CAST(DAY(GETDATE()) AS VARCHAR(2)) AS                                                                                            [Month DD]

Regards,
VDC

Random Solutions  
 
programming4us programming4us