what exactly do you mean by not working?
this is for the record select statement
this is from 5 am to 5;30 am - if you wanted pm you need to chnage the formula to use those values... time(17,0,0)
the first condition is optional but limits the set to the last month in you do not want to use run time parameters
what is the field type for tasks.opendate?
if it is a string you can convert it to a datetime in each of the conditions
example
datetime({tasks.opendate}) in lastfullmonth
and
datepart('w',datetime({tasks.opendate})) in 2 to 6
and
time({tasks.opendate}) in time(5,0,0) to time(5,30,0)
if you are getting an actual error, what is the error you are getting and what is highlighted on it?
Edited by DBlank - 15 Jul 2014 at 11:23am