6 Replies Latest reply: May 15, 2014 9:53 AM by Steve Caiels

# Julian Date

I have a database with real julian dates, ex:2450816= jan 2 1998, 2450817= jan 3 1998, how can I convert this format to our calendar dates?

Any help would be greatly appreciated.

Maria

• ###### Julian Date

Monarch V7 or V8 includes a Julian date conversion function.  See: JulianToDate function in Monarch V7 or V8 help.

The use of Julian dates are usually rare but in the (U.S.) military, the use of Julian dates are surprisingly common.  For Monarch V6 and prior, a (VERY) long formula may do the trick, but I understand some exceptions might exist such as the presence of a leap year.  Monarch V8 has many more benefits that justify upgrading beyond Julian date conversions   smile.gif[/img]

• ###### Julian Date

Mike:

I have Monarch v8. JulianToDate assumes the date format "YYYYDDD" instead of "julian". My database uses the real julian calendar, which is not the format supported by monarch.

• ###### Julian Date

Todd:

Monarch cannot read it, it gives me a "null" result.

• ###### Julian Date

Maria

Try this formula - note you need to replace the field with the field name you are using.

Note that the input field needs to be a numeric data type and this field needs to be a date calculated field.

Ctod(Str(Int((Int(80(Int((Int()+68569)-Int((146097(Int((4(Int()68569))/146097))3)/4)-Int(1461(Int(4000((Int()+68569)-Int((146097(Int((4(Int()68569))/146097))3)/4)1)/1461001))/4)31))  /2447))+2-12(Int((Int(80(Int((Int()+68569)-Int((146097(Int((4(Int()68569))/146097))3)/4)-Int(1461(Int(4000((Int()+68569)-Int((146097(Int((4(Int()68569))/146097))3)/4)+1)/1461001))/4)  31))/2447))/11))),2,0)"/"Str((Int((Int()68569)-Int((146097(Int((4(Int()68569))/146097))3)/4)-Int(1461(Int(4000((Int()+68569)-Int((146097(Int((4(Int()68569))/146097))3)/4)1)/146100  1))/4)31))-Int(2447(Int(80(Int((Int()+68569)-Int((146097(Int((4(Int()68569))/146097))3)/4)-Int(1461(Int(4000((Int()+68569)-Int((146097(Int((4(Int()68569))/146097))3)/4)1)/1461001))  /4)31))/2447))/80),2,0)"/"Str(Int(100((Int((4(Int()68569))/146097))-49)(Int(4000((Int()68569)-Int((146097(Int((4(Int()68569))/146097))3)/4)1)/1461001))(Int((Int(80*(Int((Int()685 69)-Int((146097(Int((4(Int()68569))/146097))3)/4)-Int(1461(Int(4000((Int()68569)-Int((146097(Int((4(Int()68569))/146097))3)/4)1)/1461001))/4)+31))/2447))/11))),4,0))

Please note that for some reason the forum software inserts a space in one of the instances of 68569, so make sure you delete that after you have pasted it.

Gareth

Originally posted by Maria1121:

I have a database with real julian dates, ex:2450816= jan 2 1998, 2450817= jan 3 1998, how can I convert this format to our calendar dates?

Any help would be greatly appreciated.

Maria /b[/quote]

• ###### Julian Date

Gareth

Nice easy formula. NOT!

One limitation is that Monarch has to be in m-d-y format for this to work, but otherwize this is very cool.

Regards,

smile.gif[/img]

• ###### Julian Date

Hi,

I have an expression that works for the few dates you have used.But PLEASE look into this more before using it live as I’m not an expert on Julian dates.

{01/01/1998}+(jd-2450815)

I don’t THINK there will be any issues regarding leap years, but you may wish to check that carefully.

Regards

Steve