Now you have the original string column, unchanged, plus a new numeric copy of that column. The formula is simply the original column, :timeChar A, inside the Num() operator. To make a new numeric copy of the original column, use the New Column() operator with the arguments specifying the new column’s name (“timeNum A”), data type (Numeric), the new format desired (in this case “hr:m:s”), and a formula. You can either make a new, numeric column that converts the strings to date/time values using a formula, or you can change the character column directly into a numeric column. You have two options for how to handle this, depending on what your goals are. The columns might look like this: Here’s a simple JSL script you can run to create a data table like this one: New Table( "sample", You might run into this situation frequently when importing data from text files or from other programs such as Microsoft Excel. Let’s assume you have a data table includes date, time, or duration values as strings, in character columns. What is the JSL command to convert a character data type (“hr:m:s” –eg:”23:59:59″) to a Numeric, Continuous, duration (“hr:m:s”) data type? Dates and times in a character column ![]() Sudarshan Krishnan asked a question on the LinkedIn JMP Professional Network about how to change a string column into a numeric date column:
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |