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
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Getdate

Author  Topic 

danasegarane76
Posting Yak Master

242 Posts

Posted - 2007-06-05 : 03:11:11
Dear All,
How can I convert the getdate to this format "dd-mm-yyyy"
using select query

Thnks in Advance
Dana

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-06-05 : 03:22:39
[code]select convert(varchar(10), getdate(), 103)[/code]

Why do you want to do the formating in SQL why not in your FRONT END APP ?



KH

Go to Top of Page

danasegarane76
Posting Yak Master

242 Posts

Posted - 2007-06-05 : 03:26:18
Thanks Khan,
Is there any problem in formating in the SQL side itself ?
Dana
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-06-05 : 03:52:17
No. But read this. http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=76862


KH

Go to Top of Page

danasegarane76
Posting Yak Master

242 Posts

Posted - 2007-06-05 : 04:45:32
Thnks Khan,
For the excellent info.Here after I will use to formating in client side applications only

Thnks once again
Danasekar
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-06-05 : 09:25:18
quote:
Originally posted by danasegarane76

Thnks Khan,
For the excellent info.Here after I will use to formating in client side applications only

Thnks once again
Danasekar


Thats good

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-06-05 : 09:32:40
Yes. Good choice


KH

Go to Top of Page
   

- Advertisement -