cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Sign-in to the JMP Community will be unavailable intermittently Dec. 6-7 due to a system update. Thank you for your understanding!
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.
  • JMP 19 is here! Learn more about the new features.

Discussions

Solve problems, and share tips and tricks with other JMP users.
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.

Recommended Articles