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
GoodMan
Level III

can you help me to remove date and keep "hh:mm" for distribution analysis

Dear All,

Here i hope you can help me to find a JSL way to  remove "YYYY-MM-DD" from my time recording column and just keep"hh:mm"  for time distribution analysis.

As you can find in the first attached jmp file titled with original numeric time, i have a table where" Filling Starting Time' column recorded all batch start time in " YYYY-MM-DD hh:mm". I get it from a access file with the following JSL.

Open Database("DSN=MS Access Database;DBQ=F:\freeze drying.accdb;DefaultDir=F:\;DriverId=25;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;UID=admin;", "SELECT batch, `filling starting Time` FROM `filling line`");

Now i hope i can produce a distibution graph to show that all batch starting time in hh:mm.

However when i use the following JSL,

Open Database("DSN=MS Access Database;DBQ=F:\freeze drying.accdb;DefaultDir=F:\;DriverId=25;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;UID=admin;", "SELECT batch, format(`filling starting Time`,'hh:mm' )FROM `filling line`");

i can get a table as shown another attached jmp file titled with charector hhmm. Now i get the time in "hh:mm". However it is charactor. I CAN NOT use it for distribution analysis for time in "hh:mm".

I will be grateful if you can let me me khow to sovle this problem with JSL way.

Best regards

Kun

1 ACCEPTED SOLUTION

Accepted Solutions
mpb
mpb
Level VII

Re: can you help me to remove date and keep "hh:mm" for distribution analysis

Using your "original numeric time" file, in JMP make a new column which is numeric and formatted "h:m". Make a formula for that new column defined as:

time of day(:filling starting Time).

Michael

View solution in original post

4 REPLIES 4

Re: can you help me to remove date and keep "hh:mm" for distribution analysis

The TIMEPART() function returns the TIME part of a DATETIME value.

GoodMan
Level III

Re: can you help me to remove date and keep "hh:mm" for distribution analysis

Hi Tom. Thanks for your reply. I wonder if i should use TIMEPART in SQL or JSL? Can you give me more detailed code for this case? Kun

mpb
mpb
Level VII

Re: can you help me to remove date and keep "hh:mm" for distribution analysis

Using your "original numeric time" file, in JMP make a new column which is numeric and formatted "h:m". Make a formula for that new column defined as:

time of day(:filling starting Time).

Michael

GoodMan
Level III

Re: can you help me to remove date and keep "hh:mm" for distribution analysis

Thanks for your nice solution,Michael.