?
Solved

How to convert this datetime Thu Sep 23 19:34:06 IST 2010 to mm/dd/yyyy format

Posted on 2012-03-23
4
Medium Priority
?
789 Views
Last Modified: 2012-04-03
How to convert this datetime Thu Sep 23 19:34:06 IST 2010 to mm/dd/yyyy
0
Comment
Question by:Loganathan Natarajan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 6

Accepted Solution

by:
wshark83 earned 501 total points
ID: 37756836
here's a useful link which converts dates to various formats:

http://www.sqlusa.com/bestpractices/datetimeconversion/

basically you need to use the convert(datetime,<datefield>) functions
0
 
LVL 12

Assisted Solution

by:sachitjain
sachitjain earned 498 total points
ID: 37761969
set @date = CONVERT(varchar(25), @dt, 101)

where @dt is your input datetime parameter i.e. Thu Sep 23 19:34:06 IST 2010
0
 
LVL 75

Assisted Solution

by:Anthony Perkins
Anthony Perkins earned 501 total points
ID: 37762855
How to convert this datetime Thu Sep 23 19:34:06 IST 2010 to mm/dd/yyyy format
Assuming that value is not a datetime data type (otherwise the question would never have been posed) than I suspect you need something like this:
SELECT CONVERT(varchar(10), CAST(SUBSTRING(@YourDate, 5, 6) + ',' + RIGHT(@YourDate, 4) AS date), 101)
0
 
LVL 36

Author Closing Comment

by:Loganathan Natarajan
ID: 37804655
thanks
0

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question