cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Instantly extract effect sizes, F-ratios, and FDR-adjusted p-values from your models with the Calculate Effects Sizes extension, available now in the JMP Marketplace!
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • See how to use the JMP Marketplace – Free tools to expand JMP capabilities. Register. July 10, 2 pm US Eastern Time.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
chandankishor66
Level III

Dealing with two type of date format

Hello JMP users,

I have a Date column with have two types of format .

1. Numeric format 

2. DD:MM:YY format.

How to convert the whole colum into DD:MM:YY

chandankishor66_0-1664776259696.png

Whenever I tried to change the data type and modeling type of this column, it could not change the format for whole column.

chandankishor66_1-1664776531774.png       chandankishor66_2-1664776576850.png

 

chandankishor66_4-1664776811263.png      chandankishor66_5-1664776848208.png

 

Any suggestions would be highly appreciated.

Regards.

 

 

 

 

1 REPLY 1
txnelson
Super User

Re: Dealing with two type of date format

Here is a script that will make the change

names default to here(1);
dt=current data table();
for each row(
	if(contains(:Date 2, "-" ) == 0,
		:Date 2 = format(num(:Date 2),"d/m/y")
	)
);
:Date 2 << data type(numeric)<<informat("d/m/y")<< format("d/m/y");
Jim

Recommended Articles