You don't provide enough data to do any testing, Dave, but I would approach this by using a function that converts the date and time elements into the dateTime value of the start of the 3-hour period.
Then you have a single string with which to group.
I hope this is helpful.
At 02/01/2026 13:58 +0000, you wrote:
>xslt 2.0
>
>Input
><data>
>
> <period>
> <pwr>0.136000</pwr>
> <cost>0.95204760000</cost>
> <start>
> <date>12-01</date>
> <time>00:00</time>
> </start>
> <end>00:00</end>
> </period>
> <period>
> <pwr>0.171000</pwr>
> <cost>1.19705985000</cost>
> <start>
> <date>12-01</date>
> <time>00:30</time>
> </start>
> <end>00:30</end>
> </period>
> <period>
> <pwr>0.138000</pwr>
> <cost>0.96604830000</cost>
> <start>
> <date>12-01</date>
> <time>01:00</time>
> </start>
> <end>01:00</end>
> </period>
>
>I've a months worth of data, ea 30 mins.
>How to group by and sum 3 hour blocks within
>one day please?
>group starting with date AND time AND
>group ending with date AND time seems a logical
>extension to string operations?
>
>but that's not available?
>
>Suggestions please?
>
>
>--
>Dave Pawson
>XSLT XSL-FO FAQ.
>Docbook FAQ.
><http://www.mulberrytech.com/xsl/xsl-list>XSL-List info and archive
><http://lists.mulberrytech.com/unsub/xsl-list/96802>EasyUnsubscribe (<>by email)
|