T
Tbird2340
I have a table that has a long date field. I want to calculate values off of
that field. In order for my to get the values that I need I have to change
the format from long date (date and time) into shortdate (just mm/dd/yyyy).
To do this I created a query with the following field:
CompletedDateShort: Format([CompletedDate],'mm/dd/yyyy')
I then run a SQL statement on this query in an asp page to produce the
values I want. Here is the SQL statement:
SELECT AssignedTo,
Sum(ABS(CompletedDateShort = Date())) as "Current Day",
Sum(ABS(CompletedDateShort>=Date()-7)) as "Current Week",
Sum(ABS(CompletedDateShort>=Date()-30)) as "Current Month"
FROM HelpDesk_Query
GROUP BY AssignedTo
Now, I get the correct values for the "Current Day" field but I get some
VERY off results for the other two. Any idea on what I am doing wrong?
Thanks so much!
that field. In order for my to get the values that I need I have to change
the format from long date (date and time) into shortdate (just mm/dd/yyyy).
To do this I created a query with the following field:
CompletedDateShort: Format([CompletedDate],'mm/dd/yyyy')
I then run a SQL statement on this query in an asp page to produce the
values I want. Here is the SQL statement:
SELECT AssignedTo,
Sum(ABS(CompletedDateShort = Date())) as "Current Day",
Sum(ABS(CompletedDateShort>=Date()-7)) as "Current Week",
Sum(ABS(CompletedDateShort>=Date()-30)) as "Current Month"
FROM HelpDesk_Query
GROUP BY AssignedTo
Now, I get the correct values for the "Current Day" field but I get some
VERY off results for the other two. Any idea on what I am doing wrong?
Thanks so much!