Skip to main content
Inspiring
July 22, 2008
Question

cfquery group = not working with date

  • July 22, 2008
  • 12 replies
  • 928 views
I'm working on a report in CFML that should group records by date, something like:
Tuesday, July 1, 2008
When: July 1 from 8:00 AM until 8:12 AM
Location: Chicago
Business Unit: WLS
Priority: 1, Ticket23
Brief Description: Hanes tidy whiteys
Cause: 'Cause I said so
Impact: Wrench
Resolution: We don't wanna change the world

When: July 1 from 9:00 AM until 9:12 AM
Location: New Zealand
Business Unit: Foo
Priority: 1, Ticket34
Brief Description: Glibby glab
Cause: Because we like you!
Impact: Ouch
Resolution: Nafr nafr

Wednesday, July 2, 2008
When: July 2 from 8:00 AM until 8:12 AM
Location: Berwyn
Business Unit: CTU
Priority: 5, Ticket24
Brief Description: lsdjfkjds
Cause: XXXXXXXXX
Impact: XXXXXXXXX
Resolution: XXXXXXXXXXXXXXX

What's happening is the dddd, mm/dd/yyyy are appearing for every record. I'm attaching the pertinent section of code. Thanks for any help!

This topic has been closed for replies.

12 replies

Inspiring
July 22, 2008
Does anything change if you order by the OutageDate first?

ORDER BY OutageDate, OutageStart, SCTicket
Inspiring
July 22, 2008
Try nesting an additional set cfoutput tags. See attached code.

You might also converting OutageDate to a string datatype on the server, but I don't know if that would make a difference to cfoutput's group attribute.
CONVERT(CHAR(10), SCTicket.OutageStart, 104) AS OutageDate