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 2008 Forums
 Transact-SQL (2008)
 date format

Author  Topic 

desikankannan
Posting Yak Master

152 Posts

Posted - 2013-11-12 : 23:24:53
Hi, iam inserting the record

2008-07-27 00:00:00.000

i want to display MM/dd/yyyy format

Desikankannan

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2013-11-12 : 23:29:05
that should be done at your client application

If you really need to do it at the T-SQL end, check out cast and convert()

http://msdn.microsoft.com/en-us/library/ms187928.aspx


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

bandi
Master Smack Fu Yak Hacker

2242 Posts

Posted - 2013-11-13 : 00:19:08
Refer
http://www.sql-server-helper.com/sql-server-2008/sql-server-2008-date-format.aspx

--
Chandu
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2013-11-13 : 01:10:48
As said, if you want to show your formatted dates in a front end application, do formation there. If it is only for display or you want to export to a flat file, use CONVERT function

Madhivanan

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

- Advertisement -