week and day names

  • Thread starter Thread starter LGarcia
  • Start date Start date
L

LGarcia

Hi all,
I have a startdate which I need to use to calculate weekly visits and from
that, daily visits. I'm using the following to return the week:
Week: DateAdd("d",-Weekday([STUDYStartDate]),[STUDYStartDate])+1
I need something that will give me the dates of that week with the day
names.
Hope someone can help!
TIA,
LGarcia
 
GIven a date, you can get the day name as Format(MyDate, "ddd") to get Mon,
Tue, Wed..., or Format(MyDate, "dddd") to get Monday, Tuesday, Wednesday...

Not quite sure what you mean by "give ... the dates of that week".
 
Thanks!
"give...dates of that week": I can calculate the beginning of the week from
the equation Week:
DateAdd("d",-Weekday([STUDYStartDate]),[STUDYStartDate])+1. For example, if
the result of the equation is 05/14/2006, I now need another equation(s)
that will return the weekday names and dates during the week of
5/14/2006 ---i.e. 5/15/2006 - Mon, 5/16/2006 - Tue, ...etc. thru
5/20/2006 - Sat.
It's for a report.
Thanks again,
LGarcia





Douglas J Steele said:
GIven a date, you can get the day name as Format(MyDate, "ddd") to get
Mon,
Tue, Wed..., or Format(MyDate, "dddd") to get Monday, Tuesday,
Wednesday...

Not quite sure what you mean by "give ... the dates of that week".

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


LGarcia said:
Hi all,
I have a startdate which I need to use to calculate weekly visits and
from
that, daily visits. I'm using the following to return the week:
Week: DateAdd("d",-Weekday([STUDYStartDate]),[STUDYStartDate])+1
I need something that will give me the dates of that week with the day
names.
Hope someone can help!
TIA,
LGarcia
 
Thanks! Looks like this might work. I'll give it a shot as well.


Lynn Trapp said:
Take a look at the weekdayname function.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conradsystems/accessjunkie.html



LGarcia said:
Hi all,
I have a startdate which I need to use to calculate weekly visits and
from that, daily visits. I'm using the following to return the week:
Week: DateAdd("d",-Weekday([STUDYStartDate]),[STUDYStartDate])+1
I need something that will give me the dates of that week with the day
names.
Hope someone can help!
TIA,
LGarcia
 
I now need another equation(s)
that will return the weekday names and dates during the week of
5/14/2006 ---i.e. 5/15/2006 - Mon, 5/16/2006 - Tue, ...etc. thru
5/20/2006 - Sat.

You don't need any equation at all.

Simply display the date on the Report, using a format such as

ddd, mm/dd/yyyy


John W. Vinson[MVP]
 
Unless STUDYStartDate is always the same day of the week, you'll likely have
to write a function that determines the Sunday (or Monday) previous to a
given date, and the Saturday (or Friday) after it.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


LGarcia said:
Thanks!
"give...dates of that week": I can calculate the beginning of the week
from the equation Week:
DateAdd("d",-Weekday([STUDYStartDate]),[STUDYStartDate])+1. For example,
if the result of the equation is 05/14/2006, I now need another
equation(s) that will return the weekday names and dates during the week
of 5/14/2006 ---i.e. 5/15/2006 - Mon, 5/16/2006 - Tue, ...etc. thru
5/20/2006 - Sat.
It's for a report.
Thanks again,
LGarcia





Douglas J Steele said:
GIven a date, you can get the day name as Format(MyDate, "ddd") to get
Mon,
Tue, Wed..., or Format(MyDate, "dddd") to get Monday, Tuesday,
Wednesday...

Not quite sure what you mean by "give ... the dates of that week".

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


LGarcia said:
Hi all,
I have a startdate which I need to use to calculate weekly visits and
from
that, daily visits. I'm using the following to return the week:
Week: DateAdd("d",-Weekday([STUDYStartDate]),[STUDYStartDate])+1
I need something that will give me the dates of that week with the day
names.
Hope someone can help!
TIA,
LGarcia
 
Hi again,
STUDYStartDate is static. So my Week variable will be different for each
week the study is running.
My end result (I hope) will be a report with a "For the week of: & [Week]"
in the header, and columns or rows with the dates and names of the days
within [Week]. followed by activities.
For example:
For the week of: 05/21/2006
05/22/2006 - Mon - collect ht & wt
05/23/2006 - Tue - collect urine sample
etc.......

The report will be ran weekly until the study is completed.

I found the Day function. I think I can use it as well.
Thanks for all the suggestions.


Douglas J. Steele said:
Unless STUDYStartDate is always the same day of the week, you'll likely
have to write a function that determines the Sunday (or Monday) previous
to a given date, and the Saturday (or Friday) after it.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


LGarcia said:
Thanks!
"give...dates of that week": I can calculate the beginning of the week
from the equation Week:
DateAdd("d",-Weekday([STUDYStartDate]),[STUDYStartDate])+1. For example,
if the result of the equation is 05/14/2006, I now need another
equation(s) that will return the weekday names and dates during the week
of 5/14/2006 ---i.e. 5/15/2006 - Mon, 5/16/2006 - Tue, ...etc. thru
5/20/2006 - Sat.
It's for a report.
Thanks again,
LGarcia





Douglas J Steele said:
GIven a date, you can get the day name as Format(MyDate, "ddd") to get
Mon,
Tue, Wed..., or Format(MyDate, "dddd") to get Monday, Tuesday,
Wednesday...

Not quite sure what you mean by "give ... the dates of that week".

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Hi all,
I have a startdate which I need to use to calculate weekly visits and
from
that, daily visits. I'm using the following to return the week:
Week: DateAdd("d",-Weekday([STUDYStartDate]),[STUDYStartDate])+1
I need something that will give me the dates of that week with the day
names.
Hope someone can help!
TIA,
LGarcia
 

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

Back
Top