Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Pilot_Riaz
Starting Member
16 Posts |
Posted - 2010-02-08 : 06:08:59
|
| Hi,To get today's date i use select getDate()Output = 2010-02-08 11:06:35.253I would like to format it to this format 08 February 2010It has to be this format as the function i call accepts the date parameter in this formatI have tried this which is close, but feb is in short, needs to be FebruarySELECT CONVERT(VARCHAR(9), GETDATE(), 6) AS [DD MON YY]Thanks, regards,RiazRiaz |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2010-02-08 : 06:15:46
|
you should format the date in your front end application or reporting tool where the date is being displayed.If you must do it in SQL side, use datename(month, getdate()) etc to concatenate to the required format KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2010-02-08 : 06:52:10
|
| "to concatenate to the required format""... to STUFF() into a suitable format" ?? |
 |
|
|
Pilot_Riaz
Starting Member
16 Posts |
Posted - 2010-02-08 : 06:54:14
|
| Ah right, i see now.Thanks for your help Regards, RiazRiaz |
 |
|
|
|
|
|