Numbering weeks

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mark A

    Numbering weeks

    Having looked into this quite a bit I never thought
    it could be so complicated. I mean, the concept of
    weeks seems so simple and straightforward , but
    apparently not. How you number them depends on
    who you talk to, and how you operate.

    Now Access comes up with a simple way to get
    week numbers =format(DATE(), "ww") which is
    apprarently very close to the way ISO 8601 does
    it, though there are sometimes week 53 anomolies.

    But besides that, would there be any problems with
    simply sliding the calculation round so that it works
    for the 1st April instead of the 1st Jan? We want to
    create a database using week numbering but from
    the start of our financial year, not the calender year.
    And no, we don't want to use the tax year of April
    6th. See, I said it was much more complicated than
    it first appeared. Anone now of anywhere that I
    can get some sample code or Access techniques
    for dealing with this?

    Cheers

    Regards

    Mark


  • Arno R

    #2
    Re: Numbering weeks


    "Mark A" <m.annetts-nospam@rbgkew.o rg.ukschreef in bericht news:g3l6ac02k6 b@news5.newsguy .com...
    Having looked into this quite a bit I never thought
    it could be so complicated. I mean, the concept of
    weeks seems so simple and straightforward , but
    apparently not. How you number them depends on
    who you talk to, and how you operate.

    Now Access comes up with a simple way to get
    week numbers =format(DATE(), "ww") which is
    apprarently very close to the way ISO 8601 does
    it, though there are sometimes week 53 anomolies.

    But besides that, would there be any problems with
    simply sliding the calculation round so that it works
    for the 1st April instead of the 1st Jan? We want to
    create a database using week numbering but from
    the start of our financial year, not the calender year.
    And no, we don't want to use the tax year of April
    6th. See, I said it was much more complicated than
    it first appeared. Anone now of anywhere that I
    can get some sample code or Access techniques
    for dealing with this?

    Cheers

    Regards

    Mark
    Look at Datepart() in Help
    DatePart(interv al, date[,firstdayofweek[, firstweekofyear]])

    You could also create your own tblWeeks...

    Arno R

    Comment

    Working...