Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Jan 2003
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Extracting only the month from a date field (2000)

    How do I take a date field with Month/Day/Year and extract only the month so I can sum by monthly totals.

  2. #2
    Silver Lounger GARYPSWANSON's Avatar
    Join Date
    Aug 2001
    Location
    Frederick, Maryland, USA
    Posts
    1,788
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: Extracting only the month from a date field (2000)

    You could use Month (DateFieldName) to generate a number for the month and group on this. Note: If the months span multiple years, then use the Month (DateField) and Year (DateField) and then use the group by to get the grouping by Month and Year.
    Regards,

    Gary
    (It's been a while!)

  3. #3
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Altnau, Thurgau, Switzerland
    Posts
    447
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Extracting only the month from a date field (2000)

    If you are using a cross tab you need also to cope with the case of nothing in a month else the end report will prompt for a missing field.

Posting Permissions

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