Tech Support Guy banner
  • Please post in our Community Feedback thread for help with the new forum software! If you are having trouble logging in, please Contact Us for assistance.
Status
Not open for further replies.
1 - 10 of 10 Posts

·
Registered
Joined
·
6 Posts
Discussion Starter · #1 ·
Hi,
I run a 24hour business and need to follow monthly trends in product
sales. I would like to differentiate sales during regular hours (Mon-Fri, 8am -5pm) from non regular hours. How do I put that criteria in a query? I can do it for one day, but not those hours over an extended period. I am not techno savvy. Thank you.
 

·
Registered
Joined
·
19,896 Posts
cathing59, welcome to the Forum.
Can you provide an example of the data and how you would like it?
I would think a crosstab query would be what you need.
 

·
Registered
Joined
·
6 Posts
Discussion Starter · #3 ·
I want to track products, invoices and customers from tables I have. If I put all these tables into my query, but only want to display the invoices that were generated between 8am and 5 pm, Monday to Friday, I don't know how to set that up under the criteria.
 

·
Registered
Joined
·
19,896 Posts
You will need to split the Time out from the Date, have you already done that?
You then need to convert the date to the day of the week, by adding a column like this

dayofweek: Format([DATEADDED],"dddd")

But use your date field name instead of DATEADDED
and in it's Criteria enter

Between "Monday" And "Friday"
 

·
Registered
Joined
·
19,896 Posts
You can do it in a similar way to the days that I split out using
Using something like this
Time: Format([DATEADDED],"hh:mm")
but using your Date/time field.
 

·
Registered
Joined
·
6 Posts
Discussion Starter · #8 ·
Sorry. This invoice table is populated in the date dd/mm/yyyy hh:mm:ss format. It is labelled Invoicedate. Am I changing it under the table, or under the query? Is this done under the Expression builder???
 

·
Registered
Joined
·
19,896 Posts
This is done in a query and you don't need an expression builder.
They are new Column headings.
You just need to reproduce what I posted using your date field name instead of DATEADDED which is the name of the field in the database query that I tested it on.
The Criteria can go in exactly as I posted in to your new dayofweek column.
If you want to attach a zipped database with just your table with the date field in it I can do it for you. But I will have to go very soon.
 
1 - 10 of 10 Posts
Status
Not open for further replies.
Top