Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
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
?
791 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

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

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

I have a large data set and a SSIS package. How can I load this file in multi threading?
One of the most important things in an application is the query performance. This article intends to give you good tips to improve the performance of your queries.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

636 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