add values for each day of the week

D

Dan

I have a report that I need to add up the money that came in on each day of
the week. I tried to do:
dsum("visa", "creditMoney", "day([dateReceived]) = monday")
this just doesn't seem to work any suggestions
 
T

tina

the Day() function returns the day, in a complete date value, as a number.
for today'd date, Day(Date()) would return 11. try

dsum("visa", "creditMoney", "Format([dateReceived], "dddd") = 'monday'")

hth
 
D

Douglas J Steele

Or

dsum("visa", "creditMoney", "Day([dateReceived]) = " & vbMonday)

This might be safer, just in case there are users who are set up for another
language than English.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


tina said:
the Day() function returns the day, in a complete date value, as a number.
for today'd date, Day(Date()) would return 11. try

dsum("visa", "creditMoney", "Format([dateReceived], "dddd") = 'monday'")

hth


Dan said:
I have a report that I need to add up the money that came in on each day of
the week. I tried to do:
dsum("visa", "creditMoney", "day([dateReceived]) = monday")
this just doesn't seem to work any suggestions
 
T

tina

i can't figure out how the logic works on this one, Doug, will you help me
out? (always want to learn something new) thx, tina :)


Douglas J Steele said:
Or

dsum("visa", "creditMoney", "Day([dateReceived]) = " & vbMonday)

This might be safer, just in case there are users who are set up for another
language than English.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


tina said:
the Day() function returns the day, in a complete date value, as a number.
for today'd date, Day(Date()) would return 11. try

dsum("visa", "creditMoney", "Format([dateReceived], "dddd") = 'monday'")

hth


Dan said:
I have a report that I need to add up the money that came in on each
day
of
the week. I tried to do:
dsum("visa", "creditMoney", "day([dateReceived]) = monday")
this just doesn't seem to work any suggestions
 
D

Douglas J Steele

Oops. No wonder you can't figure it out. It should be:

dsum("visa", "creditMoney", "Weekday([dateReceived]) = " & vbMonday)

Sorry about that!

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


tina said:
i can't figure out how the logic works on this one, Doug, will you help me
out? (always want to learn something new) thx, tina :)


Douglas J Steele said:
Or

dsum("visa", "creditMoney", "Day([dateReceived]) = " & vbMonday)

This might be safer, just in case there are users who are set up for another
language than English.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


tina said:
the Day() function returns the day, in a complete date value, as a number.
for today'd date, Day(Date()) would return 11. try

dsum("visa", "creditMoney", "Format([dateReceived], "dddd") = 'monday'")

hth


I have a report that I need to add up the money that came in on each day
of
the week. I tried to do:
dsum("visa", "creditMoney", "day([dateReceived]) = monday")
this just doesn't seem to work any suggestions
 
T

tina

okay, got it. and you're right, of course, it's a better solution. i keep
forgetting about the Weekday() function - i need to use it in something so
it'll stick in my head. <g> thanks, tina :)


tina said:
i can't figure out how the logic works on this one, Doug, will you help me
out? (always want to learn something new) thx, tina :)


Douglas J Steele said:
Or

dsum("visa", "creditMoney", "Day([dateReceived]) = " & vbMonday)

This might be safer, just in case there are users who are set up for another
language than English.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


tina said:
the Day() function returns the day, in a complete date value, as a number.
for today'd date, Day(Date()) would return 11. try

dsum("visa", "creditMoney", "Format([dateReceived], "dddd") = 'monday'")

hth


I have a report that I need to add up the money that came in on each day
of
the week. I tried to do:
dsum("visa", "creditMoney", "day([dateReceived]) = monday")
this just doesn't seem to work any suggestions
 
Top