I'm stuck on a query function. My query can only use CAST and cannot use CONVERT to convert the GETDATE() function into a character format DD/MM/YYY. I can get the following code
,'NBL '+'0'+CAST(DAY(GETDATE()) AS VARCHAR(2))+'/'+'0'+CAST(MONTH(GETDATE()) AS VARCHAR(2))+'/'+cast(CAST(GETDATE() AS date) as varchar(4)) as DD/MM/YY
03/09/2010 ( where this is 3rd September 2010 (today))
This won't work when the day and month are greater than 9.
I can only use this code in the 'WHERE' section of the query.