Hi,
I don't think that Format is Formating function in SQL (SQL SERVER); might be, it uses for formating data or else ... i have been using format_file etc. for formating file etc...
I have also tried now on to use
SELECT FormatedData = Format(mmm,getdate())
But got error that '
Server: Msg 195, Level 15, State 10, Line 3
'Format' is not a recognized function name. '
So, i prefered to use ...
select convert(varchar,datepart(dd,getdate())) + '-' + convert(varchar,datepart(mm,getdate())) +'-'+ convert(varchar,datepart(yy,getdate())) As FormatedDate
i have been using above way ... hope it will help you too...
Stay Beautiful,
Abdul Salam
|