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
788 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 167 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 166 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 167 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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

688 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