Forum Discussion
Julian Date Conversion or Format
- 8 years ago
Sorry, my mistake.
Please use this instead
Column = VAR myYear = 2000 + INT(DIVIDE([Julian Manufacture Date],1000)) VAR myDayOfYear = MOD([Julian Manufacture Date],1000) -1 RETURN DATE( myYear,1,1) + myDayOfYear
What is the raw format in Julian for the 1st of Jan, 1900 ?
I see where the confusion came from
00001 would be the date code for Jan 1 and could be for both 1900 and 2000 years.
The first 2 numbers are the year - 11 could be 1911, 2011, 2111
The next 3 are the day of the year - 001 would always be Jan 1. - 002 would be Jan 2 etc.
17001 would intend to be Jan 1, 2017, but could also be Jan 1, 1917.
Since this is inventory I have to measure from the date of manufacture to today to calculate how old the inventory is. I was going to convert the
- Phil_Seamark8 years agoMicrosoft Employee
Sorry, my mistake.
Please use this instead
Column = VAR myYear = 2000 + INT(DIVIDE([Julian Manufacture Date],1000)) VAR myDayOfYear = MOD([Julian Manufacture Date],1000) -1 RETURN DATE( myYear,1,1) + myDayOfYear
- jpt12288 years agoResponsive Resident
Thanks Phil_Seamark!
- pludlow8 years agoHelper I
HI, when I try this formula, I am getting a Token Eof expected error
- jpt12288 years agoResponsive Resident
Hi pludlow. Looks like a formatting error on your date see https://community.powerbi.com/t5/Desktop/Token-eof-expected/td-p/27929