I am just getting to start to know more about foxpro. I would like to know how to display a date represent a month and year only... something like this: "Jan2012"
Keep in mind that, unlike what can occur to Date appearance in Excel cell formatting, if you do as above and display the NEW variable (lcOutText) things will appear as you want, but that new variable will not ITSELF contain a Date value. It will be a character string.
So any computations or evaluations you do will need to be against the variable holding the actual Date value (ldDate).
Code:
* Examples:
dOneMonthFromNow = GOMONTH(ldDate,1)
dSixMonthsAgo = GOMONTH(ldDate,-6)
SELECT *;
FROM MyTable;
WHERE MyTable.Date <= ldDate;
INTO CURSOR Results READWRITE
etc.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.