Happy Thanksgiving 2015

  • Comments posted to this topic are about the item Happy Thanksgiving 2015

  • This was removed by the editor as SPAM

  • Unless I'm doing something funny, when I run D, I actually get 27/11/2015 (when i run it for this year, sorry, I forgot to mention that). Just me?

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Larnu (11/26/2015)


    Unless I'm doing something funny, when I run D, I actually get 27/11/2015. Just me?

    Possibly. I get 2013-11-28 00:00:00.000.

    John

  • Larnu (11/26/2015)


    Unless I'm doing something funny, when I run D, I actually get 27/11/2015 (when i run it for this year, sorry, I forgot to mention that). Just me?

    It only works if datefirst is set to 7 (Sunday) - as mentioned in the solution. You must have datefirst set to be 1 (Monday).

    Happy Thanksgiving All!

  • Fairly straightforward question. I imagine the US Regional settings thing is just to say that '20130214" is interpreted as YYYYMMDD when converted to date and that the first day or each week is Sunday.

    But the code layout is awful - was that a deliberate attempt at obfuscation? :w00t:

    Tom

  • Is the limitation of 100 years a reflection of the changes during the FDR administration when the calculation was changed to extend the shopping season? BTW, according to https://www.archives.gov/legislative/features/thanksgiving/

    For two years two days were celebrated as Thanksgiving - the President and part of the nation celebrated it on the second to last Thursday in November, while the rest of the country celebrated it the following week.

  • I got it right, but the struggle to do so showed how much my brain was slowed down after coming back from the holiday.

  • I love date math. I hope everyone had a great Thanksgiving and ate too much. 😀

  • Ed Wagner (11/27/2015)


    I love date math. I hope everyone had a great Thanksgiving and ate too much. 😀

    Yes to both having a great Thanksgiving and to eating too much.:-)

  • FridayNightGiant (11/26/2015)


    Larnu (11/26/2015)


    Unless I'm doing something funny, when I run D, I actually get 27/11/2015 (when i run it for this year, sorry, I forgot to mention that). Just me?

    It only works if datefirst is set to 7 (Sunday) - as mentioned in the solution. You must have datefirst set to be 1 (Monday).

    Happy Thanksgiving All!

    Ahh, that makes sense. I will admit though, running code that can result in different results depending on the server date settings scares me :unsure:

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • I am with WilburBud as Thanksgiving has not always been on the calculated date. See the movie Holiday Inn.

  • Larnu (11/30/2015)


    FridayNightGiant (11/26/2015)


    Larnu (11/26/2015)


    Unless I'm doing something funny, when I run D, I actually get 27/11/2015 (when i run it for this year, sorry, I forgot to mention that). Just me?

    It only works if datefirst is set to 7 (Sunday) - as mentioned in the solution. You must have datefirst set to be 1 (Monday).

    Happy Thanksgiving All!

    Ahh, that makes sense. I will admit though, running code that can result in different results depending on the server date settings scares me :unsure:

    It's not the server date settings, it's the connection date settings.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • Marcia J (11/27/2015)


    Ed Wagner (11/27/2015)


    I love date math. I hope everyone had a great Thanksgiving and ate too much. 😀

    Yes to both having a great Thanksgiving and to eating too much.:-)

    Same here.

  • Nice question but to get the good answer , I had to find the way used to calculate this date ( in France , Thanksgiving is not an holiday and rarely celebrated especially in my small town of Britany ). I had to set the correct value of DateFirst which is not the same one here.

    I am appreciated all your comments.

Viewing 15 posts - 1 through 15 (of 16 total)

You must be logged in to reply to this topic. Login to reply