I'm writing some Crystal reports that hit the LBI table. I want to know when reports are scheduled to run, and when they ran, etc. I can build performance metrics against this once I can get this info. Apparently the Quartz Scheduler stores date/time as a number using its own Java method. The fields in question are in EJS_TRIGGERS -- NEXT_FIRE_TIME, PREV_FIRE_TIME, START_TIME, etc.
Does anyone know the algorithm to use to convert these times? I see big massive numbers instead of anything sensible. I want a Year-Month-Day HH-MM-SS:xxxx result. There must be some formula.
Halp!!!
Thanks, Chris! That's what I needed. The times are stored in UNIX timestamp format, times 1,000 to give the millisecond. I used this formula for the PREV_FIRE_TIME field:
DateAdd ( "s", (INT({EJS_TRIGGERS.PREV_FIRE_TIME}/1000)-14400), #01/01/1970# ) // 14400 = seconds for 4 hours - lag behind UCT for EDT
There's an additional compensation for the time zone, because the times are stored in Universal Coordinated Time.
Glad to hear it helped. Thanks for posting the specifics of what worked (as you always do).