robert030975
MIS
- Oct 17, 2006
- 227
I want to create a simple function that will take the datetime and convert it to
14-AUG-2013.
Now the current select works fine until we get to the start of the month
and it shows
1-AUG-2013
but is there any way to make it show
01-AUG-2103
SELECT DATENAME ( DAY, GETDATE()-13 ) + '-' + UPPER (LEFT (DATENAME(MONTH,( DATEADD(Month, 0,GETDATE() ))) ,3))+ '-'+
DATENAME ( Year,GETDATE() )