Subscribe Bookmark RSS Feed

Duration [hh]:mm import

olivier_h

Community Trekker

Joined:

Apr 22, 2013

I'm trying to import this kind of data from an Excel sheet:

     Duration [hh]:mm

     19:45

     10:28

     15:35

In JMP, it is automatically translated in time and not duration so when trying to convert it back in duration, all the values are wrong. Is there a script for specifying the format of a column before the import? In this case, telling JMP to import column 1 from an Excel file in duration (hh:mm)?

Thanks.

1 REPLY
hammesjw

Community Member

Joined:

May 16, 2013

What version of JMP are you using?  When I open an Excel file with those values, it opens as a time.  Change format to duration hr:m and input Format to h:m:s it appears correct.  If you want a script this works for me (I called my Duration [hh]:mm column as "Duration"):

   FileLocation = "U:\My Documents\test.xls";

    DT= OPEN(FileLocation);

    column("Duration")<<Format("hr:m",13,"h:m:s");