• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 824
  • Last Modified:

Change a time stamp

My field in SQL comes up in theis format: 2011-10-17-12.00.20.307000

I need it in this format:10/17/2011 12:00:20:307000

I have tired this but nothing changes.
-- Code to get frm OPENQUERY into a CTE --

SELECT *, CONVERT(varchar(30),ptdatets,131) as chg FROM CTE

Open in new window

0
jaymz69
Asked:
jaymz69
1 Solution
 
BrandonGalderisiCommented:
SQL Server displays the format of the datetime based on server and client settings.  It is actually stored as an 8 byte numeric value in the database.  
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now