Results 1 to 8 of 8
  1. #1
    Join Date
    Feb 2004
    Posts
    2

    Smile Unanswered: Question of Month

    I would like to know how to retrieve the current month in Access!

  2. #2
    Join Date
    Nov 2003
    Location
    Australia
    Posts
    36

    Re: Question of Month

    Originally posted by ohoh123
    I would like to know how to retrieve the current month in Access!
    month(now) for 1 2 3 etc
    or MonthName(month(now)) for January February March etc
    or MonthName(month(now), True) for Jan Feb Mar etc

  3. #3
    Join Date
    Feb 2004
    Location
    Binary Universe
    Posts
    57
    use Access' Month() function:

    Dim intMonth as Integer
    intMonth = Month(#02/16/2004#) ' intMonth is 2

    To obtain month's name:

    Dim strName as String
    strName = MonthName(intMonth) ' strName is "February"
    strName = MonthName(intMonth, True) 'strName is "Feb"
    I won't byte... hard!

  4. #4
    Join Date
    Nov 2003
    Location
    Australia
    Posts
    36
    durr....

    like i said

  5. #5
    Join Date
    Nov 2003
    Location
    Australia
    Posts
    36
    also - he said current month! - not feb ... and that is totaly pointless since it will always return the same value

  6. #6
    Join Date
    Feb 2004
    Location
    Binary Universe
    Posts
    57
    The example was to demonstrate the technique, not to be taken literally.
    I won't byte... hard!

  7. #7
    Join Date
    Nov 2003
    Location
    Australia
    Posts
    36
    Originally posted by The Byte
    The example was to demonstrate the technique, not to be taken literally.
    yea but y repeat exactly what i said?

  8. #8
    Join Date
    Feb 2004
    Location
    Binary Universe
    Posts
    57
    Not to repeat, to clarify. Yours was a little cryptic.
    I won't byte... hard!

Posting Permissions

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