Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Substract month from month
Message
From
25/07/2005 11:00:39
 
 
To
25/07/2005 01:08:16
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows '98
Network:
Windows 98
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01035596
Message ID:
01035722
Views:
13
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 ) )
Previous
Reply
Map
View

Click here to load this message in the networking platform