Hi @LeventK ,
Thank you. Your insights are always great. I believe your expression will reset every month. For example, it will return 001 on 1st dates of all months. For example 1 Jan, 1 Feb, and 1 Mar. Whereas as per my understanding Julian date for 1st Jan is 001, 1st Feb is 032 and 1st March is 061 ( Leap Year) and 060 (Non-leap year). Basically, Julan date seems to be elapsed days from 1st Jan of that year.
Hence year and date of 1st Jan of the current year come into expression.
The following expression will return the 3 digit Julian date for all years
RIGHT(“00”&(HOUR([Order Date]- DATE(TEXT(“01/01/”&YEAR([Order Date]))))/24+1),3)
I optimized my earlier suggested expression few months ago for adjusting digit length by deploying your idea of using the RIGHT(…, 3) part of the expression.
Of course, I am sure, the expression can possibly be further optimized.
@Jonathan_S
My testing returns below Julian dates as in the image on various dates with the expression
[Order Date] is input and JDAYANY2 is the converted Julian date.
RIGHT(“00”&(HOUR([Date]- DATE(TEXT(“01/01/”&YEAR([Date]))))/24+1),3)
Please test well as dates and time logic is always a bit cumbersome.
