Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Programatically altering date
Message
 
To
11/02/2002 07:18:08
Philip Jones
Cornwall County Council
Truro, United Kingdom
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00618225
Message ID:
00618229
Views:
19
This message has been marked as a message which has helped to the initial question of the thread.
>I need to programatically alter a date value, adding to the month number.
>If datex={12/12/2002} and I do datex=datex+3 then datex={15/12/2002}
>(I've got date set to British.)
>Does anyone know if there is an equally easy way to add to the month number or do I have to mess about converting the date to characters and isolating the month digits.

hi,

1st.
Have a look at month(), date(), goMonth()

goMonth({^2002-12-12}, 3) will be {^2003-03-12}

2nd.
Start using "safe" W2K compliant dates. that is
{^2002-12-12} where {^YYYY-MM-DD}

HTH
Regards from Berlin

Frank

Dietrich Datentechnik (Berlin)
Softwarekombinat Teltow (Teltow)

Frank.Dietrich@dd-tech.de
DFPUG # 327
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform