Jump to content

Recommended Posts

Posted

Hi,

Im using App Studio 8207.18 and would like to convert an integer like a ProcessDateKey YYYYMMDD (20210701) to an integer that strips off the day, YYYYMM (202107) Does anyone have a recommendation

Thanks. Carol Sundy

Posted

You are looking for something like this

TABLE FILE ggsales

PRINT SEQ_NO

COMPUTE ProcessDateKey/YYMD = &YYMD;

COMPUTE ProcessDateKey2/I8YYMD = ProcessDateKey;

COMPUTE ProcessDateKey3/I8 = ProcessDateKey2;

WHERE RECORDLIMIT IS 1

END

Posted

David, I tweaked 2 of the lines of code and it worked!

COMPUTE ProcessDateKey2/I6YYM = ProcessDateKey;

COMPUTE ProcessDateKey3/I6 = ProcessDateKey2;

Thanks for the suggestion!

Carol

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...