Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting the first month day.
Message
De
22/06/2001 09:02:28
 
 
À
22/06/2001 07:56:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00522336
Message ID:
00522372
Vues:
9
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
    set date to ymd

    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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform