Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Problem

Status
Not open for further replies.

pvuppa1

Programmer
Nov 14, 2003
61
US
Hi everyone, I have a date format problem. I need to format year in the following manner everything seems to be fine except setting YEAR=YEAR+1

YEAR/A4YY='&USEYEAR';
concatenating here for querying
TESTDT1/A8YYMD=YEAR | '0701';
BEGDATE/YYMD=TESTDT1;
...my query


have to add reset value of year to year+1 tried both
SET YEAR=YEAR+1; and
YEAR=YEAR+1;
gave me an error abt conversion from alaphanumeric to numeric.
Any ideas ?
-P
 
Try;

-SET &USEYEAR=&USEYEAR+1;
YEAR/A4YY='&USEYEAR';

the dash (-) in the first column tells Focus that this is a Dialogue Manager command.

HTH
 
If you are using a define when you try to add 1 to the Year, it won't work since YEAR is an alpha field. You would need to change it to an Integer field first.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top