cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
jfsilves
Level I

Date-Time Formats

I have date-time data in a column of form:

2020-04-30T17:29:48.967-04:00

 

This data was loaded from a database.  JMP recognizes it only as a string of characters.

How can I convert this into a JMP datetime format?

P.S. I do not care about the timezone (-04:00).

 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Date-Time Formats

Here is a little script that should convert the column to a JMP date time value

names default to here(1);
dt=current data table();
for each row(
	:date = substr(:date, 1, length(:date)-length(word(-1,:date,"-"))-1);
);

dt:date << data type(numeric)<<modeling type(continuous);
dt:date << format("yyyy-mm-ddThh:mm:ss");

Just replace the values of :Date to whatever your column name is

Jim

View solution in original post

1 REPLY 1
txnelson
Super User

Re: Date-Time Formats

Here is a little script that should convert the column to a JMP date time value

names default to here(1);
dt=current data table();
for each row(
	:date = substr(:date, 1, length(:date)-length(word(-1,:date,"-"))-1);
);

dt:date << data type(numeric)<<modeling type(continuous);
dt:date << format("yyyy-mm-ddThh:mm:ss");

Just replace the values of :Date to whatever your column name is

Jim

Recommended Articles