Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to get Monday's date from given date?
Message
 
 
À
16/04/2002 14:50:51
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00645626
Message ID:
00645632
Vues:
10
The following function will return date of any day of the week for specified date. It assumes that Sunday is the first day of the week.
Function DOWdate
Lparams dInDate, nDow
Return IIF(BETWEEN(nDOW,1,7), dInDate + (nDow - DOW(dInDate)), {})

? DOWdate( DATE(), 1)   && date for Sunday
? DOWdate( DATE(), 2)   && date for Monday
? DOWdate( DATE(), 7)   && date for Saturday
>Hi All,
>
>I’m working on a payroll overtime program and struggling with the following. End user is suppose to give a date range and overtime is calculated accordingly. Our work week starts on Monday.
>
>My question is ,
> If user gives the starting date (MyDate) any thing other than MONDAY, how to find Monday’s date from MyDate ???
>
>Please Help !!!
>
>TIA
>
>- Jeana -
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform