Subscribe Bookmark RSS Feed

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

GoodMan

Community Trekker

Joined:

Oct 28, 2011

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
Solution

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

4 REPLIES
tom

Community Trekker

Joined:

Jul 9, 2011

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

GoodMan

Community Trekker

Joined:

Oct 28, 2011

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

Solution

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

Community Trekker

Joined:

Oct 28, 2011

Thanks for your nice solution,Michael.