some background: i have 56 rooms that have one of 60 different status' at any time. the status for each location is updated when necessary.
what i NEED is the ability to query from one date TO another date. ok, i can do that.
what i can't do is grab any of the status time posted to a location if the first date is BEFORE the #from# date.
i pass the #from# and #to# dates from a form to an action page.
my query so far:
<cfquery datasource="mymess" name="locationA">
select updt, uptm, nextdt, nexttm
from cs_dyna
where updt BETWEEN #from# and #to#
AND cell = 'A-7'
AND status = 'Active'
</cfquery>
for my output i use the DateDiff to determine the shift time between dates.
is there any way i can output this total for the whole date range selected?
example: from = 6/17/2001
to = 6/24/2001
my record has a date range of 6/15/2001 to 6/18/2001 but the way the query is set now, this record is skipped and my time is not counted.
what i would like to do is change the first date to #from# (6/17/2001) and then figure the elapsed time.
any ideas? i've tried so many things my eyes are crossed. any help will be greatly appreciated! thanx!
psdiva
what i NEED is the ability to query from one date TO another date. ok, i can do that.
what i can't do is grab any of the status time posted to a location if the first date is BEFORE the #from# date.
i pass the #from# and #to# dates from a form to an action page.
my query so far:
<cfquery datasource="mymess" name="locationA">
select updt, uptm, nextdt, nexttm
from cs_dyna
where updt BETWEEN #from# and #to#
AND cell = 'A-7'
AND status = 'Active'
</cfquery>
for my output i use the DateDiff to determine the shift time between dates.
is there any way i can output this total for the whole date range selected?
example: from = 6/17/2001
to = 6/24/2001
my record has a date range of 6/15/2001 to 6/18/2001 but the way the query is set now, this record is skipped and my time is not counted.
what i would like to do is change the first date to #from# (6/17/2001) and then figure the elapsed time.
any ideas? i've tried so many things my eyes are crossed. any help will be greatly appreciated! thanx!
psdiva