Week number in Access 2002
Results 1 to 2 of 2

Thread: Week number in Access 2002

  1. #1
    Registered User
    Join Date
    Jan 2001
    Location
    Scotland
    Posts
    468

    Week number in Access 2002

    Anyone know how to return the week number (Jan 01 - 07 = wk 1) from a stored date in Access?

    I know the Excel WEEKNUM function.

    Thanks

  2. #2
    Registered User
    Join Date
    Jan 2001
    Location
    Scotland
    Posts
    468
    In case it's of any use to anyone else......

    After hours of VB coding failures using Format Year, Format Month, Format Week etc., etc., I went back to Basics (well, built-in functions actually) and coding directly into a text box...

    =DatePart("ww",[DateField]) where [DateField] is the date field you want to return the week number of, does it.

    Predictably, finding this expression in the Help file is hopeless.

    Are there any more functions of DatePart that are not in the help files? Substituting (for "ww")...

    "q" returns the calendar querter in which the date falls
    "yyyy" the year
    "mm" the month
    "ddd" the day

    Probably most people are familiar with the last three, but does anyone know any other functions in the sub-set?


    I know "Man is a complicating animal" - perhaps I'll now remember that!..

    Just a bit more knowledge to forget!!
    Last edited by Lowland; January 24th, 2003 at 09:26 AM.

Bookmarks

Posting Permissions

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