Forum Discussion

codyraptor's avatar
codyraptor
Icon for Resolver I rankResolver I
4 years ago
Solved

7digit Julian to Date provides incorrect date

Need help please.  I have a column filled with Julian dates.  I can use 'To_Date(date, 'j') and get the correct result in SQL without any issues.  However, I need to do this in M to maintain query fo...
  • ronrsnfld's avatar
    ronrsnfld
    4 years ago

    The code from the blog that you tried is, I believe, using a different definition of Julian date than you are.  Some define Julian date as the Gregorian Date in the format of  yyyyddd  where "ddd" is the day number of the year.  So 2-Jan-2020 would be 2020002 in that system.

     

    See this article on Julian Day Numbers by Peter Meyer for more information than you really need. I would think a simple subtraction should work.

  • codyraptor's avatar
    codyraptor
    4 years ago

    Awesome!  Thanks Ron