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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert Alpha to Integer

Status
Not open for further replies.

LeonelSanchezJr

Programmer
Jan 26, 2001
522
US
I have the following code which provides me with a
report begin date and it works for one file which has a
date field in the format of YYMD.

However, the second file has the date field defined as
I11 and the data looks like this 20070215 for instance.

So, I need to take the code below for the -SET command for the &RPT_BEG_DATE2 and create a &RPT_BEG_DATE3 but instead
make the end result an integer so that I can query the table with a field of I11 with date values.

-DEFAULT &RPTDATE=&YYMD.EVAL;
-SET &RPT_BEG_DATE2 = EDIT(&RPT_BEG_DATE, '$$$$$$9999') | EDIT(&RPT_BEG_DATE, '99$$$$$$$$') | EDIT(&RPT_BEG_DATE, '$$$99$$$$$') ;

I am using WebFOCUS Developer Studio Version 714.

Thanks!



Thanks,

Leo ;-)
 
You request shows 20070215 for an I11 field; how is the rest of the field filled?


&YYMD should return integer values 20080212 for today. This is a legacy date format. Is the field in question a standard date? (We once called them smart dates.)

Or is it a date/time stamp?

 
The actual field value of type I11 in the table
is: 00020070215.

What I need to do though, is filter on that field based upon my &RPT_BEG_DATE2, however that only works for fields of type YYMD.



Thanks,

Leo ;-)
 
If your field is declared as I11, then it's NOT a date field, but only a number (up to 11 positions).

Since you're creating your variables in Dialogue Manager, there is no concept of format. EVERYTHING is stored as a character string. So, if you use your created variables, AS IS, it should work, since you're creating a numeric string.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top