cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
New to using JMP? Hit the ground running with the Early User Edition of Discovery Summit. Register now, free of charge.
Register for our Discovery Summit 2024 conference, Oct. 21-24, where you’ll learn, connect, and be inspired.
Choose Language Hide Translation Bar

about cal datetime..

hello.


col1 : 2024-07-12 14:21:33
col2 : 333
cal_col3 : 2024-07-12 19:54:33

“How can I calculate the date and time in Col3 by adding the minutes specified in Col2 to the date and time in Col1 in JMP?

For example, if Col1 contains 2024-02-01 14:21:33 and Col2 contains 333, I want Col3 to show 2024-02-01 19:54:33
2 REPLIES 2
Thierry_S
Super User

Re: about cal datetime..

Hi,

You can use the "Date Increment" function to calculate what you need (see below)

Date Increment( :Col1, "Minute", :Col2)

Best,

TS

Thierry R. Sornasse
txnelson
Super User

Re: about cal datetime..

If your col1 is a character column and not a JMP numeric DateTime column you will need to use this formula for the calculation

Date Increment(
	Informat( :col1, 
		"Format Pattern", "<YYYY><-><MM><-><DD><hh><:><mm><:><ss>" ),
	"Minute",
	:col2
)
Jim