Display the day of week

  • Thread starter Thread starter John K
  • Start date Start date
J

John K

I presently have a form that has a WeekEnding field of type date/time. I
also have seven other fields (date/time), the seventh one of which
references that field and the others are that field -1, -2, -3 etc. It works
fine, (displaying 04/24/2004, 04/23/2004, 04/22/2004 etc) but I would like
to display the day of the week (Sunday, Monday, Tuesday etc or whatever day
of the week it is) in those seven fields.

In short, I want to enter one date using the format xx/xx/xxxx and have the
seven other fields fill in with the day of the week name, using the
xx/xx/xxxx WeekEnding field as the reference date(day).

How can this be accomplished? I looked at the DatePart function but it is
greek to me. I guess I need the expression spelled out clearly so I can get
a handle on how to do this. This is with Access 2003, working on a form and
using the expression builder.

Thanks, John
 
John K said:
I presently have a form that has a WeekEnding field of type
date/time. I also have seven other fields (date/time), the seventh
one of which references that field and the others are that field -1,
-2, -3 etc. It works fine, (displaying 04/24/2004, 04/23/2004,
04/22/2004 etc) but I would like to display the day of the week
(Sunday, Monday, Tuesday etc or whatever day of the week it is) in
those seven fields.

In short, I want to enter one date using the format xx/xx/xxxx and
have the seven other fields fill in with the day of the week name,
using the xx/xx/xxxx WeekEnding field as the reference date(day).

How can this be accomplished? I looked at the DatePart function but
it is greek to me. I guess I need the expression spelled out clearly
so I can get a handle on how to do this. This is with Access 2003,
working on a form and using the expression builder.

Thanks, John

Try ControlSources like these:

=Format([txtWeekEndDate]-6, "dddd")
=Format([txtWeekEndDate]-5, "dddd")
=Format([txtWeekEndDate]-4, "dddd")
=Format([txtWeekEndDate]-3, "dddd")
=Format([txtWeekEndDate]-2, "dddd")
=Format([txtWeekEndDate]-1, "dddd")
=Format([txtWeekEndDate], "dddd")
 
Back
Top