A
Amin
My first question is pretty straightforward. I want to get the difference in
minutes between two times. I am using CDATE(Time1 - Time 2) and I get the
following:
Time1 Time2 Difference
9:50:21 AM 9:11:04 AM 12:39:17 AM
This is what I want, but I need the difference to be in minutes, not in time.
My second question involves partitions. I am trying to count the number of
records in 15 minute intervals. For example
8:15
8:16
8:17
8:31
8:33
When I run my partition, I want my count to return three records between
8:15 and 8:30 and two records between 8:30 and 8:45
My code looks like this:
PARAMETERS Forms!Switchie!StartDate DateTime, Forms!Switchie!EndDate DateTime;
TRANSFORM COUNT(*) AS Occurences
SELECT TimeField, COUNT(*) AS [Total Workloads]
FROM [mytable]
Group BY TimeField
PIVOT Partition([TimeField],1,24,1);
This obviously does not work
minutes between two times. I am using CDATE(Time1 - Time 2) and I get the
following:
Time1 Time2 Difference
9:50:21 AM 9:11:04 AM 12:39:17 AM
This is what I want, but I need the difference to be in minutes, not in time.
My second question involves partitions. I am trying to count the number of
records in 15 minute intervals. For example
8:15
8:16
8:17
8:31
8:33
When I run my partition, I want my count to return three records between
8:15 and 8:30 and two records between 8:30 and 8:45
My code looks like this:
PARAMETERS Forms!Switchie!StartDate DateTime, Forms!Switchie!EndDate DateTime;
TRANSFORM COUNT(*) AS Occurences
SELECT TimeField, COUNT(*) AS [Total Workloads]
FROM [mytable]
Group BY TimeField
PIVOT Partition([TimeField],1,24,1);
This obviously does not work