Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting the first month day.
Message
From
22/06/2001 09:02:28
 
 
To
22/06/2001 07:56:49
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00522336
Message ID:
00522372
Views:
8
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform