Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting the first month day.
Message
De
22/06/2001 09:05:19
 
 
À
22/06/2001 09:02:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00522336
Message ID:
00522373
Vues:
11
Whooops!

My date format is YYYY/MM/DD. Change the code as follows


>If the parameter is a date field
>
>
>function FirstDayOfMonth
>    lpar tdVar
>    local lcWasDateFormat, llWasCentury, lcReturn
>    assert vartype(tdVar) = 'D'
>
>    lcWasDateFormat = set('date')
>    llWasCenturyOn = set('century') = 'ON'
>    set century on
<b>    set date to DMY</b>
>
>    lcReturn = transform(tdVar - day(tdVar) + 1, '@D')
>
>    set date to &lcWasDateFormat
>    if not llWasCenturyOn
>        set century off
>    endif
>    return lcReturn
>endfunc
>
>
>>Hello at alls.
>>I wonder to know with one the way to get the first month day since any date and in format DD/MM/YYYY.
>>TIA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform