- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: can you help me to remove date and keep "hh:mm" for distribution analysis
Thanks for your nice solution,Michael.