Timestamp conversion? it just nulls out if I try to format as a timestamp2024-01-06 13:59:00+00:00
I am getting timestamps in this format. JMP auto-formats them as Charact-Nominal....How do I get these to be a proper timestamp format?
Content OrganizationRe: Timestamp conversion? it just nulls out if I try to format as a timestampCreate formula column with formula
Informat(Word(1, :Column 1, "+"))
where :Column 1 is your string formatted "date". This formula will pick anything before "+" and JMP is most likely able to convert that to a numeric format (if JMP isn't able to do that, you might have to add Format pattern to Informat())
Re: Timestamp conversion? it just nulls out if I try to format as a timestampunfortunately, there is no placeholder available yet for timezone offsets like +00:00
but one could hard-code the "+00:00" via
Informat( :Column 1, "Format Pattern", "<YYYY><MM><DL><DD> <HH>:<MM>:<SS>+00:00" )<P>actually no benefit compared to Jarmos version - just a much longer code.<BR />maybe: you can force Jmp to place DD and MM at the right position :)</img><BR /><BR />If you want to parse input with varying timezone offset, you have to split off the timezone info and add it later:</P><PRE><CODE class=" language-jsl">Informat( Word( 1, :input, "+" ) ) + Num( Word( 1, Word( 2, :input, "+" ), ":" ) )
* 60 * 60
If there are negative offsets as well, it gets harder and harder to parse.
Then you should consider this request from the wish list:Date Format Pattern - additional functionality
and maybe support it with a Kudo ...