Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Substract month from month
Message
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:
01035603
Views:
16
This message has been marked as the solution to the initial question of the thread.
SET CENTURY ON
SET DATE TO MDY
lnMoveMonths = -3 && move forward or backward
lcDelimiter = "-" && SET("Mark") 
lcTextboxValue = "02-2005"
lcTextboxValue = DTOC(GOMONTH(DATE(VAL(SUBSTR(lcTextboxValue, ATC(lcDelimiter, lcTextboxValue) + 1)), VAL(LEFT(lcTextboxValue, ATC(lcDelimiter, lcTextboxValue) -1)), 1), lnMoveMonths))
lcTextboxValue  = LEFT(lcTextboxValue, 2) + "-" +RIGHT(lcTextboxValue, 4)
?lcTextboxValue
>Dear Sir,
>
>I have a character type textbox="02-2005" && February 2005
>I want to substract 3 months from it.
>
>Please elp
Previous
Reply
Map
View

Click here to load this message in the networking platform