Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Substract month from month
Message
De
25/07/2005 11:00:39
 
 
À
25/07/2005 01:08:16
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows '98
Network:
Windows 98
Database:
Visual FoxPro
Divers
Thread ID:
01035596
Message ID:
01035722
Vues:
14
I have a character type textbox="02-2005" && February 2005
I want to substract 3 months from it.
LOCAL lcString, lnMonth, lnYear, ldNewDate
SET LIBRARY TO FoxTools.fll ADDITIVE
lcString = ALLTRIM( Thisform.MyTextbox.Value )
lnMonth = VAL( WordNum( lcString, 1, [-] ) )
lnYear = VAL( WordNum( lcString, 2, [-] ) )
ldNewDate = GOMONTH( DATE( lnYear, lnMonth, 1 ), -3 )
lcString = PADL( MONTH( ldNewDate ), 2, [0] ) + [-] + TRANSFORM( YEAR( ldNewDate ) )
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform