Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Option for date of week
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01057746
Message ID:
01058183
Views:
12
>>>Look at
DOW(datefield, 2)
>>
>>Not sure how does this help me. I guess, I didn't explain my need very well. I have a numeric field in a table called nDow. I want to show options with days of weeks
>>Monday Tuesday ... Friday and have my field to be a controlsource for the option group. Borislav and me both have the same idea of adding invisible Sunday to the option group. This way the second available and visible option Monday will be saved as 2 in my table (exactly what I want, since a week starts with Sunday).
>
>Naomi,
>
>I'm lost. My solution was based on there being a date field. Now I don't know what to think. The solution could be as simple as your using SET FDOW TO 2 or doing some modulus 7 arithmetic.
>
>If you tell me what you're trying to do here with the numeric field, it would help.

We schedule batch processes to run in the particular day of week. Say, on Monday we're running Letter processing, on Tuesday - UB printing, etc. So, in my table I store the day of week I want to run the process. We want to run the processes only on work days, since on Saturday and Sunday Network administrators run different administrative tasks. So, I put an option group on the form and create options with captions from Monday through Friday. I want to store number of the day in my table. I don't want to do any additional transformation with this number, e.g. Monday is 2, Tuesday is 3, etc. So the simplest solution here is to add an additional option number one (Sunday) and make it invisible.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform