Results 1 to 4 of 4

Thread: Return the Week Number and Month's name !

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2002
    Location
    Virginia
    Posts
    88

    Return the Week Number and Month's name !

    I have a date filed in an access report , i would like to find a function or something that will take the date value and return a string that tells the week number and the month's name ...

    appreceate any help

  2. #2
    New Member
    Join Date
    Jun 2003
    Posts
    9
    You can use the DatePart function to return integers representing the components of your date..

    eg

    If your date is 12/16/2003

    Code:
    Dim weekday As Integer
    Dim month As Integer
    weekday = DatePart("w", date_value) 
    month = DatePart("m", date_value)

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Mar 2002
    Location
    Virginia
    Posts
    88
    thanks for your reply ,, but can you tell me who can i put this in an expresion window in an access report please

  4. #4
    Lively Member MileOut's Avatar
    Join Date
    Nov 2001
    Location
    Glasgow
    Posts
    83

    Re: Return the Week Number and Month's name !

    Originally posted by stono
    I have a date filed in an access report , i would like to find a function or something that will take the date value and return a string that tells the week number and the month's name
    To return the week number:

    Code:
    intWeekNumber = CInt(Format(Date(), "ww"))
    To return the Month name:

    Code:
    strMonthName = Format(Date(), "mmmm")
    Talk History Forum - Discussing the past...

Posting Permissions

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



Click Here to Expand Forum to Full Width