Hackers Guide to Visual FoxPro 7.0
Set FDoW, Set FWeek, Set("FDoW"), Set("FWeek")
FDoW sets the first day of the week, used to calculate DoW() (day of week) and Week(). FWeek determines how to compute the first week of the year for the Week() function.| Usage | SET FDOW TO [ nFirstDayOfWeek ] nFirstDayOfWeek = SET( "FDOW" ) SET FWEEK TO [ nFirstWeek ] nFirstWeek = SET( "FWEEK" ) |
| Parameter | Value | Meaning |
| nFirstDayOfWeek | Omitted or 1 | Sunday is the first day of the week. |
| 2 – 7 | Use days Monday – Saturday as the first day. | |
| nFirstWeek | Omitted or 1 | The week containing January 1 is week 1. |
| 2 | The week containing at least four days in the new year is week 1. | |
| 3 | Week 1 is the first week completely within the new year. |
These functions come in handy for calculations involving work scheduling. You'll want to ensure your application SETs these explicitly in code or the CONFIG.FPW file if you plan to do calculations on these dates, because many manufacturing firms use week numbers as a key part of planning and scheduling.
| Example | SET FWEEK to 3 && First week is a full seven days SET FDOW to 4 && Set the first day to Wednesday |
| See Also | Date(), Day(), DMY(), DoW(), GoMonth(), MDY(), Month(), Set Century, Set Date, Set Mark To, Set FDow, Week(), Year() |
View Updates
Copyright © 2002 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. All Rights Reserved.
Категории