Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Manipulating dates
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00154553
Message ID:
00154612
Views:
18
>>Hi all,
>>
>>I have to create a function where I need to flag a record where the (RecordDate - 2 months) <= date(). I'm not sure how to do it. Can I just create something like an arithmetic statement to do the job??
>
>Pretty trivial; you can add or subtract months to a date using GOMONTH, so try something like:
>
>IF GOMONTH(dMyDateField,-2) <= DATE()
>
>You can add days by simple arithmetic; for example, two days ago would be:
>
>DATE()-2


Thank you very much for the quick replies gentleman!! They all came in handy!!
Perry E. Chrzanowski
Programmer/Analyst
Saturn (Solutions) Inc.
Previous
Reply
Map
View

Click here to load this message in the networking platform