on 05-25-2011 1:03 PM
Hello all,
in a routine I wamt to assign a char value to an int:
data l_day type d value '20110101'.
data day type i.
day = l_day.
Now my problem is, that the integer variable day is filled witth a value 734139.
What is the best thing to do to obtain 20110101 for the integer variable l_day?
Thank You!
Goliad001
hi,
Include one more step, first take the value of date in char and then pass it to integer.
data l_day type d value '20110101'.
data c_day(8) type c.
data day type i.
c_day = l_day.
day = c_day.
day will have the value as 20110101.
regards,
Arvind.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.