add values for each day of the week

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 
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
 
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
 
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top