Sunday=1, Monday=2 how do I get it to show for two weeks

A

awerland

=Sum(IIf(Weekday([StartDate])=2,[Hours],0))
This is for Monday and it calculates the hours for the first monday of a two
week payperiod. I want another row for the second monday of the same
payperiod. How can I get it work. If I change it in the range of 1-7 it
works for the first week, but how can I use this for the second week???
Amy
 
A

awerland via AccessMonster.com

Karl

Thank you for your reply. I am still having problems... I changed the 1 for
a 2 to indicate that second week. you can e-mail me at awerland at
springfieldmo dot gov

Thanks

KARL said:
Try this --
=Sum(IIf(Weekday(DateAdd("ww",1,[StartDate]))=2,[Hours],0))
=Sum(IIf(Weekday([StartDate])=2,[Hours],0))
This is for Monday and it calculates the hours for the first monday of a two
week payperiod. I want another row for the second monday of the same
payperiod. How can I get it work. If I change it in the range of 1-7 it
works for the first week, but how can I use this for the second week???
Amy
 
K

KARL DEWEY

I am still having problems...
That does not tell me anything.
Post sample data for both weeks of the pay period.
Post your query SQL.
--
KARL DEWEY
Build a little - Test a little


awerland via AccessMonster.com said:
Karl

Thank you for your reply. I am still having problems... I changed the 1 for
a 2 to indicate that second week. you can e-mail me at awerland at
springfieldmo dot gov

Thanks

KARL said:
Try this --
=Sum(IIf(Weekday(DateAdd("ww",1,[StartDate]))=2,[Hours],0))
=Sum(IIf(Weekday([StartDate])=2,[Hours],0))
This is for Monday and it calculates the hours for the first monday of a two
week payperiod. I want another row for the second monday of the same
payperiod. How can I get it work. If I change it in the range of 1-7 it
works for the first week, but how can I use this for the second week???
Amy
 
A

awerland via AccessMonster.com

could you please e-mail me - I would like to send you my sample database.
Thank you in advance.

KARL said:
That does not tell me anything.
Post sample data for both weeks of the pay period.
Post your query SQL.
[quoted text clipped - 13 lines]
 
K

KARL DEWEY

NO!
I do not e-mail to and from unknown sites.
Just post the sample data and SQL.
To get SQL open query in design view, click on menu VIEW - SQL View,
highlight all, copy, and paste in a post.
--
KARL DEWEY
Build a little - Test a little


awerland via AccessMonster.com said:
could you please e-mail me - I would like to send you my sample database.
Thank you in advance.

KARL said:
I am still having problems...
That does not tell me anything.
Post sample data for both weeks of the pay period.
Post your query SQL.
[quoted text clipped - 13 lines]
works for the first week, but how can I use this for the second week???
Amy
 
J

John W. Vinson/MVP

could you please e-mail me - I would like to send you my sample database.
Thank you in advance.

That is considered a rather rude and inappropriate request in this
newsgroup. The people answering questions here, including Karl, are
UNPAID VOLUNTEERS donating their time for free. Private email support
is appropriate for paying consulting customers; and I don't know Karl
well enough to know if he even takes private consulting customers.
He's declined your offer twice. Leave it at that and do as he
requested.
 

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

Top