<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Custom Functions in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/helpful-Custom-Functions/m-p/825824#M100639</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Add Custom Functions(
	New Custom Function(
		"hogi",
		"replace head",
		Function( {orig, new Head},
			{Default Local},
			mydummy = Expr( dummy() );
			For Each( {arg}, Name Expr( orig ), Insert Into( mydummy, arg ) );
	
			( Substitute( Name Expr( mydummy ), Expr( dummy() ), Name Expr( new Head ) ) );
		),
		&amp;lt;&amp;lt; description("takes the first argument and replaces its head with the second argument"),
		&amp;lt;&amp;lt; example(Expr(
			hogi:replace head({1,2,{3,4}}, Expr(Show()));
			
			orig = Expr(Max(1,2,3));
			hogi:replace head(Name Expr(orig), Expr(Show()));			
		))
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 03 Jan 2025 21:25:30 GMT</pubDate>
    <dc:creator>hogi</dc:creator>
    <dc:date>2025-01-03T21:25:30Z</dc:date>
    <item>
      <title>helpful Custom Functions</title>
      <link>https://community.jmp.com/t5/Discussions/helpful-Custom-Functions/m-p/825740#M100618</link>
      <description>&lt;P&gt;You know a cool trick / helpful gimmick?&lt;/P&gt;
&lt;P&gt;-&amp;gt; please share with us : )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;[More&amp;nbsp;&lt;/SPAN&gt;&lt;A class="lia-mention-container-editor-message lia-img-icon-forum-thread lia-fa-icon lia-fa-forum lia-fa-thread lia-fa" href="https://community.jmp.com/t5/Discussions/Topic-Containers/m-p/699825#U699825" target="_blank"&gt;Topic Containers&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;like this]&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Oct 2025 22:58:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/helpful-Custom-Functions/m-p/825740#M100618</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2025-10-07T22:58:22Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Functions</title>
      <link>https://community.jmp.com/t5/Discussions/helpful-Custom-Functions/m-p/825750#M100619</link>
      <description>&lt;P&gt;&lt;FONT face="courier new,courier"&gt;InFormat&lt;/FONT&gt; doesn't understand Timezone information like &lt;FONT face="courier new,courier"&gt;+01:00&lt;/FONT&gt; : (&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;In Format("2025-01-01T00:00+01:00") // -&amp;gt; .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;use this Workaround:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Add Custom Functions(
	New Custom Function(
		"custom",
		"TimeZone_to_Time",
		Function( {col_a},
      {Default Local}, 
				Informat( Word( 1, col_a, "+" ), Empty() )
		+In Hours( Num( Word( 1, Word( 2, col_a, "+" ), ":" ) ) )
),
		&amp;lt;&amp;lt;Formula Category( "Date Time" ),
		&amp;lt;&amp;lt;Transform Category( 1 ),
		&amp;lt;&amp;lt;Description( "takes a Date (String) with Timezone information and converts it to a number \!n works as well as column transform -- please change the format manually" ),
		&amp;lt;&amp;lt;Example(Expr(
		b = date time:TimeZone_to_Time("2025-01-01T00:00+01:00");
			)
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The disadvantage:&lt;BR /&gt;When you use the formula via right click / new formula column, the column will show the date in seconds - instead of&amp;nbsp;&lt;CODE class=" language-jsl"&gt;2025-01-01T00:00&lt;/CODE&gt;&lt;BR /&gt;... seems that you have to adjust the format manually.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jan 2025 21:24:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/helpful-Custom-Functions/m-p/825750#M100619</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2025-01-03T21:24:55Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Functions</title>
      <link>https://community.jmp.com/t5/Discussions/helpful-Custom-Functions/m-p/825824#M100639</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Add Custom Functions(
	New Custom Function(
		"hogi",
		"replace head",
		Function( {orig, new Head},
			{Default Local},
			mydummy = Expr( dummy() );
			For Each( {arg}, Name Expr( orig ), Insert Into( mydummy, arg ) );
	
			( Substitute( Name Expr( mydummy ), Expr( dummy() ), Name Expr( new Head ) ) );
		),
		&amp;lt;&amp;lt; description("takes the first argument and replaces its head with the second argument"),
		&amp;lt;&amp;lt; example(Expr(
			hogi:replace head({1,2,{3,4}}, Expr(Show()));
			
			orig = Expr(Max(1,2,3));
			hogi:replace head(Name Expr(orig), Expr(Show()));			
		))
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 03 Jan 2025 21:25:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/helpful-Custom-Functions/m-p/825824#M100639</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2025-01-03T21:25:30Z</dc:date>
    </item>
  </channel>
</rss>

