Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
First day of the week
Message
De
13/09/2004 10:33:29
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00941538
Message ID:
00941605
Vues:
7
>I have little problems.
>
>With code i find
>
>=Test39( {^2004/09/29} ) give 03/10/2004 For 02/10/2004
>=Test39( {^2004/09/20} ) give 26/09/2004 For 25/09/2004
>
>
>A idea ?
>
>bernhart
>
>
>
>*=FirstDay( {^2004/09/22} )
>
>
>FUNCTION Test39( )
> LPARAMETERS dDate
>
> LOCAL ret_val
> ret_val = dDate + (7-DOW(dDate,2)) && tdDate - Dow(tdDate,2) + 1
>
> WAIT WINDOW ret_val
>
>ENDFUNC
>
>
>
>>
>>FUNCTION LastDay(dDate)
>>
>> LOCAL ret_val
>> ret_val = dDate + (7-DOW(dDate,2))
>>
>>RETURN CDOW(ret_val) + " " + DTOC(ret_val)
>>
Function GetFirstDay(tdDate) && Monday first
return tdDate - Dow(tdDate,2) + 1

Function GetLastDay(tdDate) && Monday first,Sunday last
return tdDate - Dow(tdDate,2) + 7

Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform