Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Convert Alpha to Integer

Convert Alpha to Integer

Convert Alpha to Integer

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.

-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.



Leo winky smile  

RE: Convert Alpha to Integer

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?

RE: Convert Alpha to Integer

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.


Leo winky smile  

RE: Convert Alpha to Integer

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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close