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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Convertion of datetime

Author  Topic 

Moo
Starting Member

10 Posts

Posted - 2008-08-04 : 11:29:29
Hi Friends,
I used a query like

SELECT CONVERT(VARCHAR(9), Articledatetime, 6)as Articledate from advertisement

to get the Result and i get result like this
12 jul 08 but i need a result like this 12 Jul 2008

jdaman
Constraint Violating Yak Guru

354 Posts

Posted - 2008-08-04 : 11:43:59
SELECT CONVERT(VARCHAR, Articledatetime, 106)...
Go to Top of Page

raky
Aged Yak Warrior

767 Posts

Posted - 2008-08-04 : 11:47:45
quote:
Originally posted by Moo

Hi Friends,
I used a query like

SELECT CONVERT(VARCHAR(9), Articledatetime, 6)as Articledate from advertisement

to get the Result and i get result like this
12 jul 08 but i need a result like this 12 Jul 2008



use this

SELECT CONVERT(VARCHAR(11), Articledatetime,106)as Articledate from advertisement
Go to Top of Page

Moo
Starting Member

10 Posts

Posted - 2008-08-04 : 11:48:20
K Thank you .Now i got it
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-08-04 : 13:20:20
If its for display purpose consider doing this at your front end application
Go to Top of Page
   

- Advertisement -