DateTime Confusion and SQL

 That is not what I thought when I read the announcement. 

Off the top of your head, If I asked you what the time would be in a datetime for midnight what would you say?

12:00:00…not sure why I say that. It would make more sense as 00:00:00 but you said off the top of my head

And the confusion begins. The question first came up because a user asked me to start and stop something. Here’s what the user responded when I asked the question “What should I set the dates to be?”:

1/1/2012 12:01 AM
1/31/2012 12:00 PM

Now, in hindsight, I could have asked a more specific question. However, from what I asked I took this to mean this is when it should start and end. From that I created the SQL dates:

2012-01-01 00:00:00.000
2012-02-01 00:00:00.000

Now, my accomplice agreed with me that the dates given would translate to the dates I came up with. So, let me throw you another curve. I received an announcement which pertains to the dates. Here’s what it read:

12 midnight, Sunday, January 1, 2012, and close at 12 midnight, Tuesday, January 31, 2012

I told my accomplice:

I’m trying to determine if what they said, is the same as what I have, is the same as what I was told…

He thought that based on the announcement:

so the datetime should be 01/02/2012 00:00:01.000?…it looks like they want it to open first thing on Monday Jan 2nd and close on the end of the day on the 31th.

I had to agree with him. However, it seems we’ve established that this can be a very confusing subject. I may not have what they said, but I have what I was told. I believe that what I was told is what they meant to say. Therefore everything is no longer confusing. Right?

Tagged with: