Display from beginning of week?

T

theintern

Is there some sort of setting where i can tell it to start out from the
beginning of this week? For example, each time i run a macro telling it to
display 1 week, I want it to start that one week at the beginning of the
current week. Right now it is starting wherever the scrollbar happens to be.

thanks
scott
 
J

Jack Dahlgren

Scott,

If you are using a macro there are a number of different date functions that
are available to determine the start of the week.

I'd probably use now() to determine the current date or use currentdate,
then take get the day which should return an integer which determines which
day of the week it is. Then I'd subtract that from the current date to get
the first day of the week. You will have to test to see if you want to
subtract it or it - 1. I think the latter is more likely correct. Once you
have the date of the first day of the week you can work things out from there.

Also check out the firstdayofweek value. At least that is what I think it is
called.

-Jack Dahlgren
 
T

theintern

Worked great. I just modified the From Date and To Date in the line about
the photo, using the Date-Workday(Date()) for the From and something like
Date+(8-Workday(Date())) for the To Date.

Thanks!
scott
 
J

Jack Dahlgren

Glad to be of help. If you appreciate the answer, clicking on the did this
post answer the question button and or the was this post helpful button would
be a nice gesture.

-Jack
 

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