How to set Default Date Form Value to run from Fri to Sun, when ran on a Mon?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DawnAnne1974
    New Member
    • Feb 2006
    • 1

    How to set Default Date Form Value to run from Fri to Sun, when ran on a Mon?

    I need to set a default date on a form that when it comes to a Monday, the form from and to dates will default to the Friday to Sunday of the previous week. For all other day, the form should default to the previous day.

    Can anyone help?
    Thanks in advance
  • CaptainD
    New Member
    • Mar 2006
    • 135

    #2
    First, need to know what language or program you're using.

    Basically, use a DayOfWeek(YourD ate) (Depends on the program or language)to find out what day your at and then use a DateAdd(YourDat e, -HowManyDays) to get the date you want.

    Originally posted by DawnAnne1974
    I need to set a default date on a form that when it comes to a Monday, the form from and to dates will default to the Friday to Sunday of the previous week. For all other day, the form should default to the previous day.

    Can anyone help?
    Thanks in advance

    Comment

    Working...