473,466 Members | 1,294 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Date Calculation query.

Hello,

I would like to automatically get the number of assignments received
between a 24 hour period for the past 8 days. I am using

"where received >= date_add( now() , interval -1 day)" to get
yesterdays assignments....
Jul 19 '05 #1
3 1528
Patrick McDonald wrote:
Hello,

I would like to automatically get the number of assignments received
between a 24 hour period for the past 8 days. I am using

"where received >= date_add( now() , interval -1 day)" to get
yesterdays assignments....


I didn't understand what you want. And why doesn't date_add() help you
to do this? Or do you mean that you want to get 8 numbers, one number
for each day for the past 8 days? If you are not using time and/or it is
enough for you that we use date to separate rows, then just:

# This is not tested
select count(*) from assignments where received >= date_sub( now(),
interval 8 day ) group by received;
Jul 19 '05 #2
Patrick McDonald wrote:
Hello,

I would like to automatically get the number of assignments received
between a 24 hour period for the past 8 days. I am using

"where received >= date_add( now() , interval -1 day)" to get
yesterdays assignments....


I didn't understand what you want. And why doesn't date_add() help you
to do this? Or do you mean that you want to get 8 numbers, one number
for each day for the past 8 days? If you are not using time and/or it is
enough for you that we use date to separate rows, then just:

# This is not tested
select count(*) from assignments where received >= date_sub( now(),
interval 8 day ) group by received;
Jul 19 '05 #3
Patrick McDonald wrote:
Hello,

I would like to automatically get the number of assignments received
between a 24 hour period for the past 8 days. I am using

"where received >= date_add( now() , interval -1 day)" to get
yesterdays assignments....


I didn't understand what you want. And why doesn't date_add() help you
to do this? Or do you mean that you want to get 8 numbers, one number
for each day for the past 8 days? If you are not using time and/or it is
enough for you that we use date to separate rows, then just:

# This is not tested
select count(*) from assignments where received >= date_sub( now(),
interval 8 day ) group by received;
Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Raghu | last post by:
Hello... I am running into a problem while running a query..can some1 help.. this is the query : ************** SELECT * from Table S where S.dtDate1 BETWEEN...
1
by: Paolo | last post by:
Friends, I have created a database in Access 97 based on two splitted files. This application has been running and used by a couple of hundreds of users in different Offices around the World. I...
5
by: David B | last post by:
I have a number of queries, running one after the other, which do quite a complex calculation. A text box on a form provides the date for this routine. I have another routine I wish to do and it...
2
by: Norbert Lieckfeldt | last post by:
I am setting up a database for a friend who's an Optician, using MS Access 2002. All seems to be working well, but I have hit a snag. There's a calculated field both in a form and a query which...
1
by: John Feeley | last post by:
am tring to add a number of years to a dob. im doing this by adding my date+years*365.26 I get a string of numbers. I then convert the number in the next column to actual date again. I'm getting...
2
by: Julie Wardlow | last post by:
Help! I am calculating a future date using the DateAdd function in a query (the calculation also involves an IIf statement), and have managed to get this formula to produce the required result....
10
by: sandraz444 | last post by:
I have an expression in the query under my form to autofill the date under a certain condition but it wont write to the underlying table?? The date shows in the form but not the table. Does anyone...
15
by: edouard.spooner | last post by:
Hi, I have a tricky SQL query problem that I'm having probs with. I have a table which resembles something like this Date | Price1 | Price2 | Price3 01 Jan 2006 | 100 | 100 | 100 02 Jan...
1
by: c8tz | last post by:
This is a query I have created that picks up the top 3 dates for this data (for example) : Tree Pos2 Date 1 15 23/08/2005 1 20 12/02/2006 1 32 15/10/2006 ...
8
by: Proaccesspro | last post by:
I have several reports that are date driven. (There is a Date field called date received in the DB) I need to offer the user a time frame for each report. For example, I have a report named by...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.