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
 Convert Date

Author  Topic 

Sanjay_Bakshi
Starting Member

14 Posts

Posted - 2008-07-18 : 14:29:05
Dear All,

2008-07-18 13:04:06.200
how to convert this date into
2008-07-18 01:04 PM


Sanjay

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-07-18 : 14:36:33
You can use the CONVERT function with the appropriate style, however you should be doing this at the application layer rather than in T-SQL.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-07-18 : 14:36:52
two options:-
1. Try to do it in front end application if you can
2.use CONVERT function
Go to Top of Page

Sanjay_Bakshi
Starting Member

14 Posts

Posted - 2008-07-18 : 14:39:03
Please tell me how to do in Application Layer. I am using ASP.Net

Sanjay
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-07-18 : 14:43:18
But are you using C# or VB.NET? In VB.NET, you can use FormateDate function.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-07-21 : 03:18:27
quote:
Originally posted by Sanjay_Bakshi

Please tell me how to do in Application Layer. I am using ASP.Net

Sanjay


Find examples at www.asp.net

Madhivanan

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

- Advertisement -