cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-68082%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E7%BB%84%E5%90%88%E5%8D%95%E7%8B%AC%E7%9A%84%E6%97%A5%E6%9C%9F%E5%92%8C%E6%97%B6%E9%97%B4%E5%88%97%E4%BB%A5%E5%BD%A2%E6%88%90%20ISO%208601%20%E6%A0%BC%E5%BC%8F%20(yyyy-mm-ddThh%3Amm)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-68082%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E6%88%91%E6%AD%A3%E5%9C%A8%E5%B0%9D%E8%AF%95%E7%94%9F%E6%88%90%E4%B8%80%E4%B8%AA%20ISO%208601%20%E6%A0%BC%E5%BC%8F%E7%9A%84%E5%88%97%EF%BC%8C%E5%AE%83%E5%B0%86%E4%B8%A4%E4%B8%AA%E5%8D%95%E7%8B%AC%E7%9A%84%E6%97%A5%E6%9C%9F%E5%92%8C%E6%97%B6%E9%97%B4%E5%88%97%E7%BB%84%E5%90%88%E6%88%90%E4%B8%80%E4%B8%AA%E8%81%94%E5%90%88%E6%97%A5%E6%9C%9F%2F%E6%97%B6%E9%97%B4%E5%BD%A2%E5%BC%8F%20(yyyy-mm-ddThh%3Amm)%E3%80%82%20%E8%BF%99%E6%98%AF%E4%B8%80%E4%B8%AA%E4%BE%8B%E5%AD%90%EF%BC%9A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CTABLE%3E%3CTBODY%3E%3CTR%3E%3CTD%3E%E6%97%A5%E6%9C%9F%EF%BC%88%E5%B9%B4-%E6%9C%88-%E6%97%A5%EF%BC%89%3C%2FTD%3E%3CTD%3E%E6%97%B6%E9%97%B4%EF%BC%88%3A%E5%A4%A9%3A%E5%B0%8F%E6%97%B6%3A%E5%88%86%3A%E7%A7%92%EF%BC%89%3C%2FTD%3E%3CTD%3E%3CP%3E%E7%BA%A6%E4%BC%9A%E6%97%B6%E9%97%B4%3CSPAN%3E(yyyy-mm-ddThh%3Amm)%3C%2FSPAN%3E%3C%2FP%3E%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E2000-07-20%3C%2FTD%3E%3CTD%3E%3A0%3A09%3A30%3A00%3C%2FTD%3E%3CTD%3E%3CSPAN%3E2000-07-20T09%3A30%3C%2FSPAN%3E%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E1993%E5%B9%B44%E6%9C%8830%E6%97%A5%3C%2FTD%3E%3CTD%3E%3A0%3A12%3A01%3A00%3C%2FTD%3E%3CTD%3E%3CSPAN%3E1993-04-30T12%3A01%3C%2FSPAN%3E%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E2003-05-05%3C%2FTD%3E%3CTD%3E%3A0%3A16%3A28%3A00%3C%2FTD%3E%3CTD%3E%3CSPAN%3E2003-05-05T16%3A28%3C%2FSPAN%3E%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%E6%88%91%E5%B0%9D%E8%AF%95%E7%AE%80%E5%8D%95%E5%9C%B0%E5%B0%86%E2%80%9CTIME%E2%80%9D%E5%88%97%E7%9A%84%E6%A0%BC%E5%BC%8F%E6%9B%B4%E6%94%B9%E4%B8%BA%3CSPAN%3Eyyyy-mm-ddThh%3Amm%20%E4%BD%86%E8%BF%99%E7%BB%99%E4%BA%86%E6%88%91%201904%20%E5%B9%B4%E7%9A%84%E6%97%A5%E6%9C%9F%E3%80%82%3C%2FSPAN%3E%E6%9C%89%E4%BB%80%E4%B9%88%E6%83%B3%E6%B3%95%E5%90%97%EF%BC%9F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-68099%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%E7%BB%84%E5%90%88%E5%8D%95%E7%8B%AC%E7%9A%84%E6%97%A5%E6%9C%9F%E5%92%8C%E6%97%B6%E9%97%B4%E5%88%97%E4%BB%A5%E5%88%B6%E4%BD%9C%20ISO%208601%20%E6%A0%BC%E5%BC%8F%20(yyyy-mm-ddThh%3Amm)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-68099%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E5%98%BF%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F12389%22%20target%3D%22_blank%22%3E%40Valley_Gurl%3C%2FA%3E%20%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%E5%B9%B8%E8%BF%90%E7%9A%84%E6%98%AF%EF%BC%8C%E8%BF%99%E6%AF%94%E7%9C%8B%E8%B5%B7%E6%9D%A5%E6%9B%B4%E5%AE%B9%E6%98%93%E3%80%821904%20%E5%B9%B4%201%20%E6%9C%88%201%20%E6%97%A5%E5%87%8C%E6%99%A8%2012%3A00%3A00%20%E6%98%AF%20JMP%20%E4%B8%AD%E6%97%A5%E6%9C%9F%2F%E6%97%B6%E9%97%B4%E5%80%BC%E7%9A%84%E5%9F%BA%E5%87%86%E5%80%BC%E3%80%82%E5%A6%82%E6%9E%9C%E6%82%A8%E5%8F%AA%E6%9C%89%E6%97%A5%E6%9C%9F%E5%80%BC%EF%BC%88%E7%AC%AC%E4%B8%80%E5%88%97%EF%BC%89%EF%BC%8C%E5%88%99%E6%98%BE%E7%A4%BA%E7%9A%84%E6%A0%BC%E5%BC%8F%E5%8C%96%E5%80%BC%E7%9A%84%E5%9F%BA%E7%A1%80%E6%98%AF%E4%B8%80%E4%B8%AA%E6%95%B0%E5%80%BC%EF%BC%8C%E8%AF%A5%E6%95%B0%E5%80%BC%E6%98%AF%201904%20%E5%B9%B4%E5%9F%BA%E5%87%86%E6%97%B6%E9%97%B4%E5%88%B0%E7%BB%99%E5%AE%9A%E6%97%A5%E6%9C%9F%E5%80%BC%E5%8D%88%E5%A4%9C%E6%89%80%E7%BB%8F%E8%BF%87%E7%9A%84%E7%A7%92%E6%95%B0%E3%80%82%E5%A6%82%E6%9E%9C%E6%82%A8%E5%8F%AA%E6%9C%89%E6%97%B6%E9%97%B4%E5%80%BC%EF%BC%88%E7%AC%AC%E4%BA%8C%E5%88%97%EF%BC%89%EF%BC%8C%E5%88%99%E5%AE%83%E6%98%AF%E8%87%AA%E5%8D%88%E5%A4%9C%E4%BB%A5%E6%9D%A5%E7%BB%8F%E8%BF%87%E7%9A%84%E7%A7%92%E6%95%B0%EF%BC%88%E5%A6%82%E6%9E%9C%E5%B0%86%E5%85%B6%E8%BD%AC%E6%8D%A2%E4%B8%BA%E6%97%A5%E6%9C%9F%2F%E6%97%B6%E9%97%B4%EF%BC%8C%E5%88%99%E4%B8%BA%201904%20%E5%B9%B4%201%20%E6%9C%88%201%20%E6%97%A5%EF%BC%89%E3%80%82%E5%9B%A0%E6%AD%A4%EF%BC%8C%E6%82%A8%E9%9C%80%E8%A6%81%E5%81%9A%E7%9A%84%E5%B0%B1%E6%98%AF%E5%B0%86%E5%AE%83%E4%BB%AC%E7%9B%B8%E5%8A%A0%EF%BC%8C%E7%84%B6%E5%90%8E%E5%BA%94%E7%94%A8%E4%B8%80%E7%A7%8D%E6%A0%BC%E5%BC%8F%E3%80%82%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%E6%95%B0%E6%8D%AE%2F%E6%97%B6%E9%97%B4%E7%9A%84%E5%88%97%E5%85%AC%E5%BC%8F%EF%BC%9A%3C%2FP%3E%3CP%3E%26nbsp%3B%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22formula.PNG%22%20style%3D%22width%3A%20805px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22formula.PNG%22%20style%3D%22width%3A%20805px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22formula.PNG%22%20style%3D%22width%3A%20805px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F12036iF0871EC10567CEA0%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22formula.PNG%22%20alt%3D%22formula.PNG%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%E5%BA%94%E7%94%A8%E6%A0%BC%E5%BC%8F%EF%BC%9A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22columninfo.PNG%22%20style%3D%22width%3A%20540px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22columninfo.PNG%22%20style%3D%22width%3A%20540px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22columninfo.PNG%22%20style%3D%22width%3A%20540px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F12037i5D07259AB622D02B%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22columninfo.PNG%22%20alt%3D%22columninfo.PNG%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E*%E7%A1%AE%E4%BF%9D%E8%BE%93%E5%85%A5%E6%A0%BC%E5%BC%8F%E4%B8%BA%E2%80%9C%E6%95%B0%E5%AD%97%E2%80%9D%EF%BC%8C%E5%9B%A0%E4%B8%BA%E6%80%BB%E5%92%8C%E7%9A%84%E7%BB%93%E6%9E%9C%E5%8F%AA%E6%98%AF%E4%B8%80%E4%B8%AA%E5%A4%A7%E6%95%B4%E6%95%B0%EF%BC%8C%E8%A1%A8%E7%A4%BA%E4%BB%8E%E5%9F%BA%E7%BA%BF%E5%88%B0%E6%89%80%E9%9C%80%E6%97%A5%E6%9C%9F%2F%E6%97%B6%E9%97%B4%E5%80%BC%E7%9A%84%E7%A7%92%E6%95%B0%E3%80%82%3C%2FSTRONG%3E%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%E7%BB%93%E6%9E%9C%EF%BC%9A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22Result.PNG%22%20style%3D%22width%3A%20736px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Result.PNG%22%20style%3D%22width%3A%20736px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Result.PNG%22%20style%3D%22width%3A%20736px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F12038i54A0CB5995202F57%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Result.PNG%22%20alt%3D%22Result.PNG%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
Valley_Gurl
Level II

Combining separate date and time columns to make ISO 8601 format (yyyy-mm-ddThh:mm)

I am trying to generate a ISO 8601 formatted column, which combines two sepatate date and time columns into a joint date/time form (yyyy-mm-ddThh:mm). Here is an example:

 

DATE (yyyy-mm-dd)TIME (:day:hr:m:s)

DATE/TIME (yyyy-mm-ddThh:mm)

2000-07-20:0:09:30:002000-07-20T09:30
1993-04-30:0:12:01:001993-04-30T12:01
2003-05-05:0:16:28:002003-05-05T16:28

 

I have tried to simply change the format for the "TIME" column to yyyy-mm-ddThh:mm but that gave me dates in 1904. Any thoughts?

1 ACCEPTED SOLUTION

Accepted Solutions
cwillden
Super User (Alumni)

Re: Combining separate date and time columns to make ISO 8601 format (yyyy-mm-ddThh:mm)

Hey @Valley_Gurl,

 

Luckily, this is easier than it looks.  12:00:00 AM January 1, 1904 is the baseline value for date/time values in JMP.  If you have date only values (first column), underlying the presented formatted value is a numeric value that is the number of seconds elapsed the baseline time in 1904 to midnight of the given date value.  If you have a time only value (your second column), it is the number of elapsed seconds since midnight (on January 1, 1904 if you convert it to date/time).  Therefore, all you need to do is sum them together, and then apply a format.

 

The column formula for data/time:

 formula.PNG

 

Applying the format:columninfo.PNG

*Make sure the input format is "Numeric" since the result of the sum will just be a large integer representing the number of seconds from baseline to the desired date/time value.  

Result:

 

 

Result.PNG

 

 

-- Cameron Willden

View solution in original post

1 REPLY 1
cwillden
Super User (Alumni)

Re: Combining separate date and time columns to make ISO 8601 format (yyyy-mm-ddThh:mm)

Hey @Valley_Gurl,

 

Luckily, this is easier than it looks.  12:00:00 AM January 1, 1904 is the baseline value for date/time values in JMP.  If you have date only values (first column), underlying the presented formatted value is a numeric value that is the number of seconds elapsed the baseline time in 1904 to midnight of the given date value.  If you have a time only value (your second column), it is the number of elapsed seconds since midnight (on January 1, 1904 if you convert it to date/time).  Therefore, all you need to do is sum them together, and then apply a format.

 

The column formula for data/time:

 formula.PNG

 

Applying the format:columninfo.PNG

*Make sure the input format is "Numeric" since the result of the sum will just be a large integer representing the number of seconds from baseline to the desired date/time value.  

Result:

 

 

Result.PNG

 

 

-- Cameron Willden

Recommended Articles