cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Discussions

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

How to convert UTC timestamp to local time in a column formula


Hi all,

I have a column Timestamp UTC in JMP with values like 2025-10-31T08:30:00.
I want to create a new column Timestamp Local that converts this UTC time to local time


Is there a simple formula-based way to add 5.5 hours to my timestamp directly in a column formula, without scripting or using Date Add?

Something like:

Informat(:Timestamp UTC, "yyyy-mm-ddThh:mm:ss") + (4 * 3600)

 but I’m not sure if this is the right syntax as it doesn't yield result nor formula evaluation errors

I also tried based on a discussion thread: 

Informat(:Timestamp UTC, "Format Pattern", "<YYYY><-><MM><-><DD><'T'><hh24><::><mm><::><ss>Z") + (4 * 3600)

- No result

 

The Formula looks like: 

Also tried Format - "yyyy-mm-ddThh:mm:ss"

col_name_list = Current Data Table() << get column names( string );

If(
	!Contains(col_name_list, "Timestamp Local"),
	Current Data Table() << New Column(
		"Timestamp Local",
		Numeric,
		Continuous,
		Format("m/d/y h:m:s"),
		Formula(
			Informat(:Name("Timestamp UTC"),
			//"Format Pattern",
			"yyyy-mm-ddThh:mm:ss") + (4* 3600)
		)
	)
);

Would appreciate any guidance or examples on how to handle UTC to local conversions cleanly within column formulas.

Thanks!

10 REPLIES 10
zetaVagabond1
Level III

Re: How to convert UTC timestamp to local time in a column formula

@jthi Refer this solution. I found it hassle free to create an extra column and use that. 

Recommended Articles