Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Australia
    Posts
    676
    Thanks
    28
    Thanked 2 Times in 2 Posts
    I am creating a query on a table that has a date/time field. I need to group the results by month, and label the groups on the report using the format "mmm yyyy". The expression "(Year[Date]) & Month([Date])" does the grouping OK but is not sorted in month order and the formatting does not work on it. How can I achieve the grouping and formatting that I need?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    You can group on an expression such as

    [Date]-Day([Date])+1

    and use the Format property of the appropriate text box on the report to display this as mmm yyyy.

  3. #3
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Australia
    Posts
    676
    Thanks
    28
    Thanked 2 Times in 2 Posts
    Thanks for your reply. That takes out the day, but as I am using a date/time field, I also need to take out the time. I tried using DateValue() on your suggestion, and that seems to work.

Posting Permissions

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