Results 1 to 8 of 8
  1. #1
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Week of the Month (2000)

    Week of the month (subject of your question) or week of the year (body of your question)?

    If you want the week of the year, you can use the DatePart function with "ww" as interval: DatePart("ww", [DateField])

  2. #2
    2 Star Lounger
    Join Date
    May 2001
    Location
    Maryland, USA
    Posts
    105
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Week of the Month (2000)

    Sorry about the confusion. I did want week of the year. Thanks for the help.

    Eric

  3. #3
    2 Star Lounger
    Join Date
    May 2001
    Location
    Maryland, USA
    Posts
    105
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Week of the Year (2000)

    Subject edited by HansV to match question

    Is there a function that will return the week of the year?

    Thanks,
    Eric

  4. #4
    2 Star Lounger
    Join Date
    Oct 2004
    Location
    Evansville, Indiana, USA
    Posts
    111
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Week of the Month (2000)

    Hans,
    I want DatePart("ww",[DateField]) to return the week number. How should I edit this to make it work? What is DateField?

  5. #5
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Week of the Month (2000)

    DateField is the name of whatever field you store your dates in. It wasn't intended to be taken literally.
    Charlotte

  6. #6
    2 Star Lounger
    Join Date
    Oct 2004
    Location
    Evansville, Indiana, USA
    Posts
    111
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Week of the Month (2000)

    Suppose I want datefield to be the current system date? Is it possible to do that, or do I need to store the current date then perform the DatePart?

  7. #7
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Week of the Month (2000)

    Yes, you can use the Date() function to return the current system date and it will work as well. You didn't specify how you wanted to use this, so the answers were general.
    Charlotte

  8. #8
    2 Star Lounger
    Join Date
    Oct 2004
    Location
    Evansville, Indiana, USA
    Posts
    111
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Week of the Month (2000)

    General answers are alright. If I need more specific, I will post more information later. Thanks a ton!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •