Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««1234»»

Dating for DBAs Expand / Collapse
Author
Message
Posted Wednesday, April 6, 2011 7:15 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: 2 days ago @ 12:38 PM
Points: 2,366, Visits: 2,716
This was a great question. I got it wrong but appreciate the information. Thanks!

- webrunner


-------------------
"Operator! Give me the number for 911!" - Homer Simpson

"A SQL query walks into a bar and sees two tables. He walks up to them and says 'Can I join you?'"
Ref.: http://tkyte.blogspot.com/2009/02/sql-joke.html
Post #1089253
Posted Wednesday, April 6, 2011 7:22 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: 2 days ago @ 8:38 AM
Points: 3,675, Visits: 72,434
cdiebolt (4/6/2011)
Add one more european developer!
I didn't know that the 2nd answer is dateformat dependent.


Me either... I was pretty sure 2011-04-28 was a dateformat neutral date...

Just a silly ANSI standard, but not dateformat neutral... :/

Of course I missed the hint (select 2)... which might have helped.




--Mark Tassin
MCITP - SQL Server DBA
Proud member of the Anti-RBAR alliance.
For help with Performance click this link
For tips on how to post your problems
Post #1089260
Posted Wednesday, April 6, 2011 8:26 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, January 31, 2013 8:01 AM
Points: 1,232, Visits: 1,046
UMG Developer (4/5/2011)
CirquedeSQLeil (4/5/2011)
UMG Developer (4/5/2011)
How many people actually use the ODBC date literals?


I think very few in comparison.


Yeah, I think the number of people answering correctly shows that. (Currently 33% of the 24 people that have answered.)


I would have to agree that using the ODBC date literals is "Old School" in a bad way.

I had a project back in the late 90's that had to show dates in Cannadian and US format.
We used the second format to transfer the dates as strings from the UI to SQL and back.

This yyyyddmm string format tested on SQL 7 and SQL 2000 as being 50% faster during a load.
I tested today when I saw the question and it still round trip faster to format the date as string in the yyyyddmm format and pass to SQL for Multilaguage and Multiformat support. Formating as string YYYY-dd-mm and doing a cast using ODBC date literals just takes longer.
Post #1089303
Posted Wednesday, April 6, 2011 8:31 AM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Tuesday, September 2, 2014 8:36 AM
Points: 3,918, Visits: 3,638

Great question. Love the title.
Post #1089310
Posted Wednesday, April 6, 2011 8:31 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, January 31, 2013 8:01 AM
Points: 1,232, Visits: 1,046
paul.knibbs (4/6/2011)
Pity you can't split the results by nationality--I wonder how many British or European DBAs would get this one wrong?

I would bet it is a greater percentage than US dba's.
Many US dba's and database developers have worked on at least one project with Canadian customers. They use the dd-mm-yyyy data format. :smooth:
It is my understanding the all of Great Briton uses the same date format.
Post #1089311
Posted Wednesday, April 6, 2011 9:19 AM
Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Wednesday, August 27, 2014 11:26 AM
Points: 668, Visits: 485
Excellent question. Got it wrong though, but learned something new today.

Thanks,
Suresh
Post #1089331
Posted Wednesday, April 6, 2011 9:28 AM


Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Saturday, September 6, 2014 8:20 AM
Points: 687, Visits: 3,004
Duncan Pryde (4/6/2011)
I'm glad people are liking the question - thanks for the positive comments everyone.

I was motivated to come up with the question after following a discussion relating to a QotD from a few weeks ago. There was some (at times quite heated!) debate around language-independent date formats, so I thought it would be good material for a question, and hopefully some more discussion.

Incidentally, there's a "second date" scheduled to be published next week, so anything you read in those links could be handy...


OK, Duncan, I got this wrong, and I'm the one who posted the link last week to Tibor Karaszi's excellent write-up!

I don't use the {} ODBC escape format, so I missed that one. Guess I learned something, so thanks.

Rich
Post #1089341
Posted Wednesday, April 6, 2011 9:30 AM


Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Monday, July 14, 2014 10:08 AM
Points: 754, Visits: 3,816
Terrific question. For some reason dates are not my best topic.

______________________________________________________________________
The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge. - Stephen Hawking
Post #1089345
Posted Wednesday, April 6, 2011 12:19 PM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, September 10, 2014 6:53 AM
Points: 1,407, Visits: 1,058
Duncan Pryde (4/6/2011)
I'm glad people are liking the question - thanks for the positive comments everyone.

I was motivated to come up with the question after following a discussion relating to a QotD from a few weeks ago. There was some (at times quite heated!) debate around language-independent date formats, so I thought it would be good material for a question, and hopefully some more discussion.

Incidentally, there's a "second date" scheduled to be published next week, so anything you read in those links could be handy...


I remembered that discussion and got the answer correct as a result! (I knew enough to test these possibilities out in SSMS with language set to British and then to French because I knew they would probably all work with my current setting of US English.) Two points is a good reward for reading, retaining, and applying information introduced in QOTD discussions.
Post #1089487
Posted Thursday, April 7, 2011 1:24 AM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Tuesday, September 2, 2014 2:55 AM
Points: 3,352, Visits: 1,482
rmechaber (4/6/2011)
Duncan Pryde (4/6/2011)
I'm glad people are liking the question - thanks for the positive comments everyone.

I was motivated to come up with the question after following a discussion relating to a QotD from a few weeks ago. There was some (at times quite heated!) debate around language-independent date formats, so I thought it would be good material for a question, and hopefully some more discussion.

Incidentally, there's a "second date" scheduled to be published next week, so anything you read in those links could be handy...


OK, Duncan, I got this wrong, and I'm the one who posted the link last week to Tibor Karaszi's excellent write-up!

I don't use the {} ODBC escape format, so I missed that one. Guess I learned something, so thanks.

Rich


Hi Rich - I couldn't remember who it was who'd posted the link, but after dipping into it a few times and reading the BOL page, a couple of questions came to mind - so thanks for sowing the seed!
Post #1089706
« Prev Topic | Next Topic »

Add to briefcase «««1234»»

Permissions Expand / Collapse