2008 Apr 14 9:31 AM
i have a date variable which has 21.03.2008 ie DD.MM.YYYY format.
i want to extract month and year separately into different variables.
wht is eh function or way to do it.
hi,
if your date is exactly the same with how you write it including the periods.
use this code
month = datum+3(2)
date = datum (2)
2008 Apr 14 9:34 AM
hi,
do this way ..
data : v_date(1) value '21.03.2008',
v_month(2),
v_year(2).
v_month = v_date+3(2).
v_year = v_date+6(4).
Regards,
Santosh
2008 Apr 14 9:34 AM
2008 Apr 14 9:35 AM
hi,
if your date is exactly the same with how you write it including the periods.
use this code
month = datum+3(2)
date = datum (2)
2008 Apr 14 9:46 AM
Hi
Check this simple program
DATA : date type string,
dd type char2,
mon type char2,
year type char4.
date = '21.04.2008'.
SPLIT date at '.' into dd mon year.
WRITE :
dd, mon, year.
HOPE IT HELPS.
2008 Apr 14 10:03 AM
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |