function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
vinothk balasubramanianvinothk balasubramanian 

Julian date to salesforce format date

Hi All,

    We have the data coming from external application to salesforce where the dates are stored in Julian format in 6 digits in external party application. . Can you please help me to convert this to salesforce date format through formula or workflow rule or Apex code

For ex : Julian date 115054 need to convert to salesforce date format 2/23/2011
ShashankShashank (Salesforce Developers) 
This should help:
Nicola MitchamNicola Mitcham

I see this was posted a while ago but I didn't see any real solution posted anywhere either so I spent last weekend headscratching on this one as I had the same issue, and this formula seems to work:

Create a text field to receive the Julian Date (length 6)
                I created 3 of these fields: DGJ Julian Date,  DDJ Julian Date, JCL Julian Date
DGJ – GL Date
DDJ – Due Date
JCL – Date Closed 

Then create a formula field for each of the text fields created:

DATE( VALUE (((MID(DDJ_Julian_Date__c,2,2)))) + 2000 , 1, 1) + (VALUE (RIGHT( DDJ_Julian_Date__c , 3))  - 1)

DATE( VALUE (((MID(DGJ_Julian_Date__c,2,2)))) + 2000 , 1, 1) + (VALUE (RIGHT( DGJ_Julian_Date__c , 3))  - 1)

If ((JCL_Julian_Date__c <> "0"),DATE( VALUE (((MID(JCL_Julian_Date__c,2,2)))) + 2000 , 1, 1) + (VALUE (RIGHT( JCL_Julian_Date__c , 3)) - 1), null)                               
-- This extra rule in the 3rd formula takes care of showing null as the outpu if the line item is still open (otherwise shows as 01Jan1899)

And you then see the dates in Salesforce and Leap Years are also taken care of (as long the dates are since year 2000).
#JulianDates #JDE

Philip GulanPhilip Gulan
Hi Nicole, 

Any idea how to convert the Creation Date to Julian Date in a Formula Field?