Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2004
    Posts
    214

    Unanswered: unbound date range

    I want to create a form with unbound date ranges. I just want the format to = month. For example: date range from: January to: March
    return would be any data between January and March. When I format the date, there's no option for just month. What is the best way to achieve this?

  2. #2
    Join Date
    Jan 2007
    Location
    California, USA
    Posts
    520
    MyMonth = Format(MyDate, "mmmm") will return the full name of a month (March, September, etc.)
    MyMonth = Format(MyDate, "mmm") will return the month name with only three characters. (Mar, Sep, Jun, etc)
    HTH,

  3. #3
    Join Date
    Jul 2004
    Posts
    214
    Thank. I'll try this.

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    bear in mind that when you want to retrieve the data you may need to take note of the time.

    Access stores dates and times as a date/time value

    so if your upper limit is, say 21 Apr 2007, you may need to express that <= #"21 Apr 2007 23:59:59# OR < #22 Apr 2007#
    otherwise an rows with a date of 21 Apr 2007 and a time element (greater than 00:00:00 will be excluded from your dataset.
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

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