Format function in query

shukla's Avatar, Join Date: Jul 2009
Newbie Member
Hi All!
I am new to sql server 2005
I want to use format function in sql query
Format(dtfld,'dd-mmm-yyyy').
How to use it ?
Also for numbers, format(no1,"0.00")
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
What is your input format and what you would like the output to be formatted.
0
shukla's Avatar, Join Date: Jul 2009
Newbie Member
My database contains dt as "datetime" type.
I want it in format as dd-mmm-yyyy
0
naimish's Avatar
Banned
MS SQL Server 2005 provides CONVERT function to change or convert the DateTime formats.



CONVERT Function syntax:

Convert (datatype, datetime string, date style)