Skip to content

Instantly share code, notes, and snippets.

@trplll
Created April 20, 2021 14:55
Show Gist options
  • Save trplll/e71711fa0e7c26a3f24ab398ec72bbcc to your computer and use it in GitHub Desktop.
Save trplll/e71711fa0e7c26a3f24ab398ec72bbcc to your computer and use it in GitHub Desktop.
Groovy Jde Julian to Java Date Conversion
import java.text.ParseException;
import java.text.SimpleDateFormat;
class Main {
static void main(String... args) {
println JulianDateToJavaDate(121110)
}
public static Date JulianDateToJavaDate(Integer julianDate) {
Date date = null;
String j = julianDate.toString();
try {
date = new SimpleDateFormat("Myydd").parse(j)
return date;
} catch (ParseException e) {
System.out.println(e.getMessage());
return;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment