cancel
Showing results for 
Search instead for 
Did you mean: 

Convert Calendar date to Julian date format

Former Member
0 Kudos

Does anyone have the logic/code to convert normal calendar date(YYYYMMDD) to Julian format using ABAP ?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

data: julian_day(3) type n,

date_aux type d,

date_I_need type d.

  • first day of the year

concatenate date_I_need(4) '0101' into date_aux.

julian_day = date_I_need - date_aux.

julian_day = julian_day + 1.

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Nice....I like it. Definitly better than what I was coming up with.

Regards,

Rich Heilman

Former Member
0 Kudos

hi juan,

that was really helpfull ........... but my requirement is to convert the current date to julian date fomat ........ only julian days won't do much..... hope to see it soon ...

thanks

Gaurav

Former Member
0 Kudos

What is the format of the Julian Day?

Maybe this http://www.numerical-recipes.com/julian.html

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Can you remind us all what julian date is. Is it not the running day number of the year?

for example......12/29/2004 = 364/2004

Regards,

Rich Heilman

Message was edited by: Rich Heilman