Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Function to get the last day of month
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00039619
Message ID:
00040390
Vues:
41
>>>* To find last day in a month out from a date
>>>lddate = CTOD("08/01/97")
>>>ldlastday = CTOD(STR(MONTH(lddate)+1)+"/01/"+STR(YEAR(lddate)))-1
>>>
>>>Works fine for me. :)
>>
>>Well. I better correct myself.
>>
>>ldlastday = CTOD(IIF(MONTH(lddate)=12, "01", STR(MONTH(lddate)+1))+"/01/"+ ;
>> IIF(MONTH(lddate)=12, STR(YEAR(lddate)+1), STR(YEAR(lddate))))-1
>>

>
>Isn't it much more complicate than mine or Jim Booth's? :)
>
>Vlad

Maybe. But it works :)

Erik Niese-Petersen
- Erik Niese-Petersen

Crazy Dane in USA.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform