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
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