<?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: Converting Military Time Format (hhhh) to Time Format (hh:mm) in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Converting-Military-Time-Format-hhmm-to-Time-Format-hh-mm/m-p/353326#M60279</link>
    <description>&lt;P&gt;Hi Jim,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I use this script? What are the variables that I needed to change?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then name of the dataset is "transaction_data" and the name of the column that resides the military time is "DAY" (transaction_data:DAY)&lt;/P&gt;&lt;P&gt;So, how should I replace these 2 variables into you script and run?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry for such a noob question.&lt;/P&gt;</description>
    <pubDate>Wed, 27 Jan 2021 16:31:05 GMT</pubDate>
    <dc:creator>Madwolf</dc:creator>
    <dc:date>2021-01-27T16:31:05Z</dc:date>
    <item>
      <title>Converting Military Time Format (hhmm) to Time Format (hh:mm)</title>
      <link>https://community.jmp.com/t5/Discussions/Converting-Military-Time-Format-hhmm-to-Time-Format-hh-mm/m-p/18488#M16841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to convert military time in the hhmm format, e.g. 1432 or 725 to hh:mm format e.g. 14:32 to 7:25.&amp;nbsp; Is there a simple formula that can make the conversion, or should I use a script for it?&amp;nbsp; Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 May 2016 06:32:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Converting-Military-Time-Format-hhmm-to-Time-Format-hh-mm/m-p/18488#M16841</guid>
      <dc:creator>nadershakerin0</dc:creator>
      <dc:date>2016-05-13T06:32:34Z</dc:date>
    </item>
    <item>
      <title>Re: Converting Military Time Format (hhhh) to Time Format (hh:mm)</title>
      <link>https://community.jmp.com/t5/Discussions/Converting-Military-Time-Format-hhmm-to-Time-Format-hh-mm/m-p/18489#M16842</link>
      <description>&lt;P&gt;There is likely a simpler way to do this; however, this works pretty well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Step 1&lt;/P&gt;
&lt;P&gt;Repeat( "0", 4 - Length( Char( :Start ) ) ) || Char( :Start )&lt;/P&gt;
&lt;P&gt;Makes the staring number into a 4 digit character padded with zeros (this is handy for zip codes too)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Step 2&lt;/P&gt;
&lt;P&gt;Left( :Step 1, 2 ) || ":" || Right( :Step 1, 2 )&lt;/P&gt;
&lt;P&gt;Inserts a colon between the hours and minutes&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Step 3&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Format( Informat( :Char 24 hr Time, "h:m" ), "h:m" )&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;This formula takes the character 24 hr time and turns it into the number of seconds after midnight, then it turns the seconds into 12 hour time.&lt;/P&gt;
&lt;P&gt;Informat evaluates a character string and returns a number&lt;/P&gt;
&lt;P&gt;format evaluates a numeric strings and returns a character&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;Start&lt;/TD&gt;
&lt;TD&gt;Step 1&lt;/TD&gt;
&lt;TD&gt;Step 2&lt;/TD&gt;
&lt;TD&gt;Step 3&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;3&lt;/TD&gt;
&lt;TD&gt;0003&lt;/TD&gt;
&lt;TD&gt;00:03&lt;/TD&gt;
&lt;TD&gt;12:03 AM&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;30&lt;/TD&gt;
&lt;TD&gt;0030&lt;/TD&gt;
&lt;TD&gt;00:30&lt;/TD&gt;
&lt;TD&gt;12:30 AM&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1130&lt;/TD&gt;
&lt;TD&gt;1130&lt;/TD&gt;
&lt;TD&gt;11:30&lt;/TD&gt;
&lt;TD&gt;11:30 AM&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1830&lt;/TD&gt;
&lt;TD&gt;1830&lt;/TD&gt;
&lt;TD&gt;18:30&lt;/TD&gt;
&lt;TD&gt;6:30 PM&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;........&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or you could do it all in one "simple" step with one formula&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Format(
	Informat(
		Left( Repeat( "0", 4 - Length( Char( :Start ) ) ) || Char( :Start ), 2 ) || ":" ||
		Right( Repeat( "0", 4 - Length( Char( :Start ) ) ) || Char( :Start ), 2 ),
		"h:m"
	),
	"h:m"
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;I keep a collection of fierce formulas that get recycled for special cases.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Oct 2018 19:13:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Converting-Military-Time-Format-hhmm-to-Time-Format-hh-mm/m-p/18489#M16842</guid>
      <dc:creator>Byron_JMP</dc:creator>
      <dc:date>2018-10-30T19:13:40Z</dc:date>
    </item>
    <item>
      <title>Re: Converting Military Time Format (hhhh) to Time Format (hh:mm)</title>
      <link>https://community.jmp.com/t5/Discussions/Converting-Military-Time-Format-hhmm-to-Time-Format-hh-mm/m-p/18490#M16843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is a different way of doing the same thing that Bryon is showing.&amp;nbsp; My version goes directly to a numeric time value, rather than creating a character value that is then input.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: #0000dd;"&gt;Names Default To Here&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: Consolas;"&gt;(&lt;/STRONG&gt; &lt;STRONG style="color: teal; font-size: 10.0pt; font-family: Consolas;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: green;"&gt;// Create a sample data table with some Military times.....&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: green;"&gt;// The column can be either numeric or character...the conversion&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: green;"&gt;// formula handles both&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;dt &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: #0000dd;"&gt;New Table&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: Consolas;"&gt;(&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: purple;"&gt;"Untitled 3"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt; Add Rows&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10.0pt; font-family: Consolas;"&gt;2&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: #0000dd;"&gt;New Column&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: Consolas;"&gt;(&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: purple;"&gt;"Military"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt; Numeric&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: purple;"&gt;"Continuous"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: #0000dd;"&gt;Format&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: Consolas;"&gt;(&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: purple;"&gt;"Best"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;,&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-size: 10.0pt; font-family: Consolas;"&gt;12&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt; Set Values&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;STRONG&gt;[&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10.0pt; font-family: Consolas;"&gt;1421&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;,&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: teal;"&gt;923&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;]&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: green;"&gt;// The wait() functions are just there to add a dramatic affect :)&lt;/img&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: #0000dd;"&gt;Wait&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: Consolas;"&gt;(&lt;/STRONG&gt; &lt;STRONG style="color: teal; font-size: 10.0pt; font-family: Consolas;"&gt;2&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: green;"&gt;// Add a new column to hold the converted times&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: green;"&gt;// Use a time format since the conversion will create&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: green;"&gt;// a value which is the number of seconds since midnight&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;dt &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;New Column&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;(&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: purple;"&gt;"time"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt; Numeric&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: purple;"&gt;"Continuous"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: #0000dd;"&gt;Format&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: Consolas;"&gt;(&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: purple;"&gt;"hr:m"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;,&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-size: 10.0pt; font-family: Consolas;"&gt;12&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: #0000dd;"&gt;Wait&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: Consolas;"&gt;(&lt;/STRONG&gt; &lt;STRONG style="color: teal; font-size: 10.0pt; font-family: Consolas;"&gt;2&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: green;"&gt;// Run across all rows and do the conversion&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: green;"&gt;// The formula will work as a column formula by just removing&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: green;"&gt;// the ":time="&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: #0000dd;"&gt;For Each Row&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: Consolas;"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;time &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: #0000dd;"&gt;Num&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: Consolas;"&gt;(&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: #0000dd;"&gt;Substr&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: Consolas;"&gt;(&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: #0000dd;"&gt;Char&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: Consolas;"&gt;(&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;Military &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;-&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10.0pt; font-family: Consolas;"&gt;2&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;*&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-size: 10.0pt; font-family: Consolas;"&gt;60&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;+&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: #0000dd;"&gt;Num&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: Consolas;"&gt;(&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: #0000dd;"&gt;Substr&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: Consolas;"&gt;(&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: #0000dd;"&gt;Char&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: Consolas;"&gt;(&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;Military &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;,&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-size: 10.0pt; font-family: Consolas;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt; &lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: #0000dd;"&gt;Length&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: Consolas;"&gt;(&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: #0000dd;"&gt;Char&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: Consolas;"&gt;(&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;Military &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;-&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: teal;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;*&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-size: 10.0pt; font-family: Consolas;"&gt;3600&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: Consolas;"&gt;)&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 May 2016 03:31:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Converting-Military-Time-Format-hhmm-to-Time-Format-hh-mm/m-p/18490#M16843</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2016-05-14T03:31:22Z</dc:date>
    </item>
    <item>
      <title>Re: Converting Military Time Format (hhmm) to Time Format (hh:mm)</title>
      <link>https://community.jmp.com/t5/Discussions/Converting-Military-Time-Format-hhmm-to-Time-Format-hh-mm/m-p/18491#M16844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Byron, thank you very much for your guidance.&amp;nbsp; Your proposed method works; however, it keeps the variable in character state.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have saved your script for future special cases!&amp;nbsp; &lt;SPAN __jive_emoticon_name="wink" __jive_macro_name="emoticon" class="jive_macro_emoticon jive_emote jive_macro" src="https://community.jmp.com/7.0.4.3b79b96/images/emoticons/wink.png"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 May 2016 00:46:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Converting-Military-Time-Format-hhmm-to-Time-Format-hh-mm/m-p/18491#M16844</guid>
      <dc:creator>nadershakerin0</dc:creator>
      <dc:date>2016-05-15T00:46:29Z</dc:date>
    </item>
    <item>
      <title>Re: Converting Military Time Format (hhmm) to Time Format (hh:mm)</title>
      <link>https://community.jmp.com/t5/Discussions/Converting-Military-Time-Format-hhmm-to-Time-Format-hh-mm/m-p/18492#M16845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jim, your solution worked perfectly. I like how everything remained in the numeric form. Thank you very much!&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN __jive_emoticon_name="cool" __jive_macro_name="emoticon" class="jive_emote jive_macro" src="https://community.jmp.com/7.0.4.3b79b96/images/emoticons/cool.png"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 May 2016 00:47:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Converting-Military-Time-Format-hhmm-to-Time-Format-hh-mm/m-p/18492#M16845</guid>
      <dc:creator>nadershakerin0</dc:creator>
      <dc:date>2016-05-15T00:47:31Z</dc:date>
    </item>
    <item>
      <title>Re: Converting Military Time Format (hhhh) to Time Format (hh:mm)</title>
      <link>https://community.jmp.com/t5/Discussions/Converting-Military-Time-Format-hhmm-to-Time-Format-hh-mm/m-p/18493#M16846</link>
      <description>&lt;P&gt;Still another approach that avoids strings altogether:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0px; font-size: 14px; line-height: normal; font-family: Courier; color: #011993;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; New Column( "time",
    Numeric,
    "Continuous",
    Format( "hr:m", 12 ),
    Formula( Floor( :Military / 100 ) * 3600 + Mod( :Military, 100 ) * 60 )
);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P style="margin: 0px; font-size: 14px; line-height: normal; font-family: Courier;"&gt;&lt;SPAN style="color: #011993;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2021 19:06:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Converting-Military-Time-Format-hhmm-to-Time-Format-hh-mm/m-p/18493#M16846</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2021-01-27T19:06:03Z</dc:date>
    </item>
    <item>
      <title>Re: Converting Military Time Format (hhhh) to Time Format (hh:mm)</title>
      <link>https://community.jmp.com/t5/Discussions/Converting-Military-Time-Format-hhmm-to-Time-Format-hh-mm/m-p/34140#M20244</link>
      <description>&lt;P&gt;How about converting from Military Time to regular?&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2017 18:51:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Converting-Military-Time-Format-hhmm-to-Time-Format-hh-mm/m-p/34140#M20244</guid>
      <dc:creator>khoepfl</dc:creator>
      <dc:date>2017-01-05T18:51:29Z</dc:date>
    </item>
    <item>
      <title>Re: Converting Military Time Format (hhhh) to Time Format (hh:mm)</title>
      <link>https://community.jmp.com/t5/Discussions/Converting-Military-Time-Format-hhmm-to-Time-Format-hh-mm/m-p/353326#M60279</link>
      <description>&lt;P&gt;Hi Jim,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I use this script? What are the variables that I needed to change?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then name of the dataset is "transaction_data" and the name of the column that resides the military time is "DAY" (transaction_data:DAY)&lt;/P&gt;&lt;P&gt;So, how should I replace these 2 variables into you script and run?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry for such a noob question.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2021 16:31:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Converting-Military-Time-Format-hhmm-to-Time-Format-hh-mm/m-p/353326#M60279</guid>
      <dc:creator>Madwolf</dc:creator>
      <dc:date>2021-01-27T16:31:05Z</dc:date>
    </item>
    <item>
      <title>Re: Converting Military Time Format (hhhh) to Time Format (hh:mm)</title>
      <link>https://community.jmp.com/t5/Discussions/Converting-Military-Time-Format-hhmm-to-Time-Format-hh-mm/m-p/353330#M60281</link>
      <description>&lt;P&gt;I posted your code, into the formula section of the new field, changed the field to my dataset column name, and it works perfectly!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Num( Substr( Char( :Military ), -2 ) ) * 60 + Num(
    Substr( Char( :Military ), 1, (Length( Char( :Military ) ) - 2) )
) * 3600&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you so much!&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2021 19:05:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Converting-Military-Time-Format-hhmm-to-Time-Format-hh-mm/m-p/353330#M60281</guid>
      <dc:creator>Madwolf</dc:creator>
      <dc:date>2021-01-27T19:05:21Z</dc:date>
    </item>
    <item>
      <title>Re: Converting Military Time Format (hhhh) to Time Format (hh:mm)</title>
      <link>https://community.jmp.com/t5/Discussions/Converting-Military-Time-Format-hhmm-to-Time-Format-hh-mm/m-p/353954#M60364</link>
      <description>I attempted to use this code to convert a string into a time format (hh:mm)&lt;BR /&gt;&lt;BR /&gt;Num( Substr( Char( :Military ), -2 ) ) * 60 + Num(&lt;BR /&gt;Substr( Char( :Military ), 1, (Length( Char( :Military ) ) - 2) )&lt;BR /&gt;) * 3600&lt;BR /&gt;&lt;BR /&gt;However, I realised if the string is only 2 digits, it won't get converted. For instance if it is 26, it won't be converted to 12:26am. However, a 3 digit string works fine (100 becomes 1:00am)&lt;BR /&gt;&lt;BR /&gt;How is that so?</description>
      <pubDate>Fri, 29 Jan 2021 15:23:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Converting-Military-Time-Format-hhmm-to-Time-Format-hh-mm/m-p/353954#M60364</guid>
      <dc:creator>Madwolf</dc:creator>
      <dc:date>2021-01-29T15:23:17Z</dc:date>
    </item>
    <item>
      <title>Re: Converting Military Time Format (hhhh) to Time Format (hh:mm)</title>
      <link>https://community.jmp.com/t5/Discussions/Converting-Military-Time-Format-hhmm-to-Time-Format-hh-mm/m-p/353958#M60367</link>
      <description>&lt;P&gt;My first question is, if the length of the input time value is less than 4 characters long, should one assume there are zeros (0) that are missing from the left side of the military time?&amp;nbsp; If this is the case, I propose the solution below;&amp;nbsp; It pads the value with leading zeros and then performs the conversion.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;standard = Substr( "00", Length( Char( :Military ) ) - 1 ) ||
Char( :Military );

Num( Substr( Char( :standard ), -2 ) ) * 60
+Num(
	Substr(
		Char( :standard ),
		1,
		(Length( Char( :standard ) ) - 2)
	)
) * 3600;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 Jan 2021 15:51:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Converting-Military-Time-Format-hhmm-to-Time-Format-hh-mm/m-p/353958#M60367</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-01-29T15:51:26Z</dc:date>
    </item>
    <item>
      <title>Re: Converting Military Time Format (hhhh) to Time Format (hh:mm)</title>
      <link>https://community.jmp.com/t5/Discussions/Converting-Military-Time-Format-hhmm-to-Time-Format-hh-mm/m-p/354023#M60373</link>
      <description>It works! Thank you so much. I learnt so much just by looking at the formulas you proposed!</description>
      <pubDate>Fri, 29 Jan 2021 17:00:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Converting-Military-Time-Format-hhmm-to-Time-Format-hh-mm/m-p/354023#M60373</guid>
      <dc:creator>Madwolf</dc:creator>
      <dc:date>2021-01-29T17:00:10Z</dc:date>
    </item>
  </channel>
</rss>

