Share your ideas for the JMP Scripting Unsession at Discovery Summit by September 17th. We hope to see you there!
Choose Language Hide Translation Bar
Highlighted
JulieSAppel
Level IV

Sorting a clock time column

Hi,

 

This is probably a very simple problem.

I want to use the graph builder to explore trends in registered clock times.

My time column is numeric, nominal but I can´t even sort the column correctly. I´ve tried changing the format but still no luck.

It´s a huge dataset so I don´t want to value order manually.

What am I doing wrong?

 

Br Julie

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
pmroz
Super User

Re: Sorting a clock time column

Your Time column is formatted to only show the hours and minutes, but it contains a date as well.  You can add a formula column with this formula: time of day(:Time), and set the format to show h:m.  That will work.  Here it is in JSL:

dt = data table("Sort time");
dt << 	New Column( "TOD", Numeric, "Continuous", Format( "h:m", 12 ),
		Input Format( "h:m" ), Formula( Time Of Day( :Time ) ) );

View solution in original post

1 REPLY 1
Highlighted
pmroz
Super User

Re: Sorting a clock time column

Your Time column is formatted to only show the hours and minutes, but it contains a date as well.  You can add a formula column with this formula: time of day(:Time), and set the format to show h:m.  That will work.  Here it is in JSL:

dt = data table("Sort time");
dt << 	New Column( "TOD", Numeric, "Continuous", Format( "h:m", 12 ),
		Input Format( "h:m" ), Formula( Time Of Day( :Time ) ) );

View solution in original post

Article Labels

    There are no labels assigned to this post.