Below is a sample function in C# to convert a date value in Julian format (from a JD Edwards database), to a date value in Gregorian format (for storing in an Oracle database).

/* convertJulianToGregorian
*
* This function takes in a Julian date string and returns a Gregorian string
* It is only intended to process years 1910 to 2999 (5 and 6 digit Julian dates)
*
*/
public static string convertJulianToGregorian(string julianDateString)
{
try
{
string julianYear = "";
string julianDay = "";

///////////////// First seperate out the Julian Year and Julian Day
// 1st 3 digits = year after 1900
// 2nd 3 digits = day in year

if (julianDateString.Length == 5)
{
// If it is only 5 digits (before year 2000) take first 2 digits
julianYear = julianDateString.Substring(0, 2);
}
else if (julianDateString.Length == 6)
{
// If it is 6 digits (after year 2000) then take first three digits
julianYear = julianDateString.Substring(0, 3);
}
else
{
return "Invalid Julian Date";
}

// The julianDay is always the last three
julianDay = julianDateString.Substring(julianDateString.Length - 3, 3);

/////////////// Now we have the Julian values, so compute Gregorian Date
DateTime GregorianDate = DateTime.Parse("1 Jan 1900"); // Start at 1900
// Add the JDE years to 1900
GregorianDate = GregorianDate.AddYears(Convert.ToInt16(julianYear));
// Add the JDE days to 1900 + JDE year
GregorianDate = GregorianDate.AddDays(Convert.ToInt16(julianDay)-1);

// Return our final date in the slasher format
return GregorianDate.ToString("MM/dd/yyyy");

}
catch (Exception e)
{
WriteErrorLog("Error Message: " + e.Message);
WriteErrorLog("Source: " + e.Source);
WriteErrorLog("Stack Trace: " + e.StackTrace);
WriteErrorLog("Target Site: " + e.TargetSite);
return "Error during processing. Verify input is a valid JDE date.";
}
}