cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Register to see how to import and prepare Excel data on Jan. 30 from 2 to 3 p.m. ET.

Discussions

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

Creating a column and Filling all rows by a date and time

I Want to create a column named, say, :CHANGE and then fill all rows by a date in the format 01/15/2026 7:02:26 PM. How do I do that. 

For some reason JSL does not recognize this format

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Creating a column and Filling all rows by a date and time

In my opinion only reliable way to format your dates to specific format in JMP (while keeping them as numeric) is to use Format Pattern

Names Default To Here(1);

dt = New Table("Untitled",
	Add Rows(7),
	Compress File When Saved(1)
);

dt << New Column("CHANGE", Numeric, Continuous, Format("Format Pattern", "<MM>/<DD>/<YYYY> <hh>:<mm>:<ss><AMPM>", 21, 0), Set Each Value(
	15Jan202619:02:27
));

JSL Syntax Reference > JSL Functions, Operators, and Messages > Date and Time Functions 

Using JMP > Set JMP Column Properties > About the Column Info Window > Numeric Formats 

-Jarmo

View solution in original post

2 REPLIES 2
jthi
Super User

Re: Creating a column and Filling all rows by a date and time

In my opinion only reliable way to format your dates to specific format in JMP (while keeping them as numeric) is to use Format Pattern

Names Default To Here(1);

dt = New Table("Untitled",
	Add Rows(7),
	Compress File When Saved(1)
);

dt << New Column("CHANGE", Numeric, Continuous, Format("Format Pattern", "<MM>/<DD>/<YYYY> <hh>:<mm>:<ss><AMPM>", 21, 0), Set Each Value(
	15Jan202619:02:27
));

JSL Syntax Reference > JSL Functions, Operators, and Messages > Date and Time Functions 

Using JMP > Set JMP Column Properties > About the Column Info Window > Numeric Formats 

-Jarmo
NewToThis
Level I

Re: Creating a column and Filling all rows by a date and time

Can't thank you enough for this. Thanks

Recommended Articles