Forum Discussion
jpt1228
8 years agoResponsive Resident
Julian Date Conversion or Format
Hello, I searched and read the 2 posts about julian dating but I can't get a solution to work. I can either convert the julian date column on my inventory table YYDDD into a calendar date or add ...
- 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
Phil_Seamark
8 years agoMicrosoft Employee
jpt1228
8 years agoResponsive Resident
Phil_Seamark Yes, that was it - Works for the Month/Day but the year is showing 1900 not 2017
- Phil_Seamark8 years agoMicrosoft Employee
What is the raw format in Julian for the 1st of Jan, 1900 ?
- jpt12288 years agoResponsive Resident
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