﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Article Discussions / Article Discussions by Author / Discuss content posted by Kev Riley  / Datetime conversion / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Sat, 25 May 2013 09:21:29 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Datetime conversion</title><link>http://www.sqlservercentral.com/Forums/Topic505599-1228-1.aspx</link><description>good question but confusing one....</description><pubDate>Tue, 04 Dec 2012 00:27:20 GMT</pubDate><dc:creator>kapil_kk</dc:creator></item><item><title>RE: Datetime conversion</title><link>http://www.sqlservercentral.com/Forums/Topic505599-1228-1.aspx</link><description>Best QoD in a while.  More like this, please!</description><pubDate>Wed, 28 May 2008 11:53:38 GMT</pubDate><dc:creator>Michael Spencer</dc:creator></item><item><title>RE: Datetime conversion</title><link>http://www.sqlservercentral.com/Forums/Topic505599-1228-1.aspx</link><description>Either Microsoft Programmers or Defaults.In the CAST and CONVERT (TSQL) BOL article there is a table with formats. My date is returned as the following if Management Studio query window withput formatting:2000-04-06 18:06:31.000according to the table, the format name and description for that are: ODBC canonical (with milliseconds) yyyy-mm-dd hh:mi:ss.mmm(24h) It is not just default:Default  mon dd yyyy hh:miAM (or PM)My assumption that it may be a front end (Management Studio) programmers formatted it this way because of 2 things:1. When I use Profiler to profile running a query in Management Studio, the Profiler shows the original query, so the formatting is done in the front end.2. Linked Server to Oracle query returnes dates /times in the same format as when running a query towards SQL Server.</description><pubDate>Wed, 28 May 2008 11:51:54 GMT</pubDate><dc:creator>Yelena Varshal</dc:creator></item><item><title>RE: Datetime conversion</title><link>http://www.sqlservercentral.com/Forums/Topic505599-1228-1.aspx</link><description>This is probably a stupid question, but what controls the formatting of a datetime column with no cast/convert (in SQL query analyzer or management studio)?</description><pubDate>Mon, 26 May 2008 06:55:21 GMT</pubDate><dc:creator>Terry Maher</dc:creator></item><item><title>RE: Datetime conversion</title><link>http://www.sqlservercentral.com/Forums/Topic505599-1228-1.aspx</link><description>Nice question......</description><pubDate>Sat, 24 May 2008 07:51:13 GMT</pubDate><dc:creator>Anipaul</dc:creator></item><item><title>RE: Datetime conversion</title><link>http://www.sqlservercentral.com/Forums/Topic505599-1228-1.aspx</link><description>Yes. 2 should have been an option. I would have gotten it wrong then instead of testing it to get it right.Nice QoD. We are destined to constantly forget the simplest of things.And...[quote]select @date, convert(varchar(20), @date)[/quote] is the same as [quote]select @date, convert(varchar(20), @date, 0)[/quote]</description><pubDate>Fri, 23 May 2008 14:32:54 GMT</pubDate><dc:creator>Tom Garth</dc:creator></item><item><title>RE: Datetime conversion</title><link>http://www.sqlservercentral.com/Forums/Topic505599-1228-1.aspx</link><description>Yes - that shows the difference between the default conversion format and the default display format.  I've seen many people get caught out by that before, expecting that left(@date,1) = '2'....hmm maybe I should have used that as one of the wrong answers....</description><pubDate>Fri, 23 May 2008 09:40:30 GMT</pubDate><dc:creator>kevriley</dc:creator></item><item><title>RE: Datetime conversion</title><link>http://www.sqlservercentral.com/Forums/Topic505599-1228-1.aspx</link><description>What is interesting, that if you don't convert to the character string, the format is different:set language us_englishset dateformat dmygodeclare @date datetimeset @date = '11 apr 2008 17:10'select left(@date,1)select @date, convert(varchar(20), @date)returns:A2008-04-11 17:10:00.000	Apr 11 2008  5:10PM</description><pubDate>Fri, 23 May 2008 09:16:59 GMT</pubDate><dc:creator>Yelena Varshal</dc:creator></item><item><title>Datetime conversion</title><link>http://www.sqlservercentral.com/Forums/Topic505599-1228-1.aspx</link><description>Comments posted to this topic are about the item [B]&lt;A HREF="/questions/SQL+Server+2005/62870/"&gt;Datetime conversion&lt;/A&gt;[/B]</description><pubDate>Thu, 22 May 2008 21:06:37 GMT</pubDate><dc:creator>kevriley</dc:creator></item></channel></rss>