get date of first monday of the given year?

  • Michael Valentine Jones (8/23/2011)


    paul_ramster (8/23/2011)


    That's the same algorithm I posted further up the thread, although rather better explained.

    The only assumption that is made is that you know a Monday, which in your case is day 0.

    I rather unnecessarily tied myself in knots trying to make that assumption explicit and avoid dates before February 1900, to avoid leap year confusions.

    If you are concerned about dates before 1900-01-01, then you could use 1753-01-01, which is the earliest possible datetime and also a Monday. Ask me how I knew that. 🙂

    Start of Week Function

    http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=47307

    Real old mother in law?

    I know I learned that from our ERP (MS Dynamics / Navision)

Viewing post 16 (of 15 total)

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