01-07-2010 1:15 AM
dear abapers
can you please advice how to convert the current date into Julian Code?
(I am not a technical person, sorry)
the example is : for today 07.01.2010
Julian code supposed to be
0007 (or just "7")
Julian code is 4 digit number:
first letter is the last digit of the current year (example - 0 for 2010, 9 for 2009,...)
other 3 digits are the day of the year (example - 0007 for 7 January, 032 for 1 February,...)
can you please provide some code?
thank you very much.
01-07-2010 1:38 AM
HI
try the below code
report z_date_to_julian.
data : v_i type i.
data : v_n(3) type n.
data : v_julian(5) type n.
data : date1 like sy-datum.
parameters : p_date like sy-datum.
concatenate p_date(4) '0101' into date1.
v_i = p_date - date1 + 1.
move : v_i to v_n.
concatenate p_date+2(2) v_n into v_julian.
write 😕 'Date -', p_date.
write 😕 'Julian -' , v_julian.
JULIAN DATE to YYMMDD format
01-07-2010 1:38 AM
HI
try the below code
report z_date_to_julian.
data : v_i type i.
data : v_n(3) type n.
data : v_julian(5) type n.
data : date1 like sy-datum.
parameters : p_date like sy-datum.
concatenate p_date(4) '0101' into date1.
v_i = p_date - date1 + 1.
move : v_i to v_n.
concatenate p_date+2(2) v_n into v_julian.
write 😕 'Date -', p_date.
write 😕 'Julian -' , v_julian.
JULIAN DATE to YYMMDD format
01-07-2010 2:23 AM
Hi chk the below link ..from Rex Jonathan Joseph .
System date conversion to Julian format