473,396 Members | 1,914 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Help: Date Fields

Hi, I have a Sales database with two fields (actually more thaqn 2 but
these are causing me grief :), one is call [date received] and is
format as dd-mm-yyyy and the other is called day with the record
source as [date received] but the format as dddd.

What I would like to do is sort the [date received] dddd field to show
all sales on a certain day (i.e Friday. however when I right click and
filter by this field it picks up the ddd-mmm-yyyy field date and only
shows all sales on that date.

I am pretty familiar with access and can deal with a little bit of
coding but a basic solution would be great
]
Thanks

David
Nov 13 '05 #1
1 1280
Here is a SQL that accumulates dividends by day Is this what you want.
Table is called Dividends with the relevant fields as below

DividendID Autonumber
DivDate Date (dividend received)
UKInterest Currency
SELECT Left(Format([DivDate],"ddd-mmm-yyyy"),3) AS [Day],
Sum(Dividends.UKInterest) AS SumOfUKInterest,
Left(Format([DivDate],"w-mmm-yyyy"),1) AS SortDay
FROM Dividends
GROUP BY Left(Format([DivDate],"ddd-mmm-yyyy"),3),
Left(Format([DivDate],"w-mmm-yyyy"),1)
ORDER BY Left(Format([DivDate],"w-mmm-yyyy"),1);

The ORDER BY bit just ensures it is printed out Sunday, Monday .....
Saturday

HTH

Phil
"Dave" <da**@fsnet.co.uk> wrote in message
news:28********************************@4ax.com...
Hi, I have a Sales database with two fields (actually more thaqn 2 but
these are causing me grief :), one is call [date received] and is
format as dd-mm-yyyy and the other is called day with the record
source as [date received] but the format as dddd.

What I would like to do is sort the [date received] dddd field to show
all sales on a certain day (i.e Friday. however when I right click and
filter by this field it picks up the ddd-mmm-yyyy field date and only
shows all sales on that date.

I am pretty familiar with access and can deal with a little bit of
coding but a basic solution would be great
]
Thanks

David

Nov 13 '05 #2

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

Similar topics

5
by: Norma | last post by:
I am trying to make a query pull data from between the dates I enter in the parameter but also look back 'in time' to see where 2 other fields have null values, and only pull data into the query if...
1
by: MHenry | last post by:
Hi, I have a table with duplicate records. Some of the duplicates need to be eliminated from the table and some need not. A duplicate record does not need to be eliminated if the one record...
28
by: Siv | last post by:
Hi, If I run the following: strSQL = "Select * FROM Clients;" da = New OleDb.OleDbDataAdapter(strSQL, Conn) 'Create data adapter cb = New OleDb.OleDbCommandBuilder(da) ...
17
by: Liam.M | last post by:
Hey guys, Forgive me if my question my be alittle silly, but I would very much appreciate and assistance that could be given! My situation is as follows: I have created a Button, and set...
4
by: JonathanParker | last post by:
Looking for some help urgently with some VB SQL Access stuff. You'll have to excuse the messiness of the code, I'm a newbie at all this. I'm running this code with a selection of check boxes to...
47
by: Jo | last post by:
Hi there, I'm Jo and it's the first time I've posted here. I'm in process of creating a database at work and have come a little unstuck.....I'm a bit of a novice and wondered if anyone could...
13
by: Jack B | last post by:
I'm using Access 2002 to create a database for a small opera company that my wife is involved in, and I'm more than a bit rusty because I haven't created a new Access database since about 1999. ...
4
by: dougmeece | last post by:
Morning Everyone... I have a table that needs to be append to and also updated. All the fields in the table are populated with data from the text boxes and combo boxes on a form. The Date...
11
by: troy_lee | last post by:
I have two fields on a form. These two fields' values are based on an expression and represent a date range. I need to create a SQL statement that will use the returned values of these two fields...
3
by: ibeehbk | last post by:
Hi. I have a form made in xhtml. I test via vbscript to make sure none of the fields are empty and properly formatted (ie email). All the regular fields work. However, I have two drop down menus...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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...

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.