cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
Alex19
Level II

How to convert Julian Date (YYDDD) to Calendar Date *ddMonyyyy"?

Hello community,

 

I think I exhausted all my options, even AI does not give me the correct answer.

I have a column with multiple Julian Dates - hundreds of them (e.g. 23233 etc.) and need to have a column with calendar date. Let's name Julian date column as "Julian Date".

 

Either formula in the column or a script would be good!

Thank you ALL!

 

Alex.

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: How to convert Julian Date (YYDDD) to Calendar Date *ddMonyyyy"?

Here is my way of handing this

txnelson_0-1734019621039.png

Names Default To Here( 1 );
dt = New Table( "Example",
	add rows( 10 ),
	New Column( "Julian Date",
		set each value(
			Num(
				Char( Random Integer( 20, 24 ) ) || Char( Random Integer( 100, 365 ) )
			)
		)
	)
);

// Create a column that converts Julian dates to JMP date values
dt << New Column( "Date",
	Format( "m/d/y" ),
	formula(
		Date MDY( 1, 1, Num( Substr( Char( :Julian Date ), 1, 2 ) ) )
		+In Days( Num( Substr( Char( :Julian Date ), 3, 3 ) ) )
	)
);
Jim

View solution in original post

2 REPLIES 2
txnelson
Super User

Re: How to convert Julian Date (YYDDD) to Calendar Date *ddMonyyyy"?

Here is my way of handing this

txnelson_0-1734019621039.png

Names Default To Here( 1 );
dt = New Table( "Example",
	add rows( 10 ),
	New Column( "Julian Date",
		set each value(
			Num(
				Char( Random Integer( 20, 24 ) ) || Char( Random Integer( 100, 365 ) )
			)
		)
	)
);

// Create a column that converts Julian dates to JMP date values
dt << New Column( "Date",
	Format( "m/d/y" ),
	formula(
		Date MDY( 1, 1, Num( Substr( Char( :Julian Date ), 1, 2 ) ) )
		+In Days( Num( Substr( Char( :Julian Date ), 3, 3 ) ) )
	)
);
Jim
Alex19
Level II

Re: How to convert Julian Date (YYDDD) to Calendar Date *ddMonyyyy"?

Works very well! Thank you Jim!!

 

Alex.