convert date to int
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
Former Member replied
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.