<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:clearspace="http://www.jivesoftware.com/xmlns/jive/rss" version="2.0">
  <channel>
    <title>Adobe Community: Message List - How to convert minutes to decimal</title>
    <link>https://forums.adobe.com/community/coldfusion/coldfusion_getting_started?view=discussions</link>
    <description>Most recent forum messages</description>
    <language>en</language>
    <pubDate>Tue, 01 Jul 2014 11:46:37 GMT</pubDate>
    <generator>Jive Engage 7.0.0.1  (http://jivesoftware.com/products/)</generator>
    <dc:date>2014-07-01T11:46:37Z</dc:date>
    <dc:language>en</dc:language>
    <item>
      <title>Re: How to convert minutes to decimal</title>
      <link>https://forums.adobe.com/message/6512744?tstart=0#6512744</link>
      <description>&lt;!-- [DocumentBodyStart:842cdf16-9251-4c95-a1db-7109d50fc353] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;If you need to round off to 2 decimals and to pad with 0s, that is, 10.50 instead of 10.5, then adapt Carl's solution to&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;lt;cfset MyDecimalTime = numberFormat(ListFirst(MyTime, ":") + (ListLast(MyTime, ":") / 60), "00.00")&amp;gt;&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:842cdf16-9251-4c95-a1db-7109d50fc353] --&gt;&lt;img src='/beacon?t=1415920217380' /&gt;</description>
      <pubDate>Tue, 01 Jul 2014 11:46:37 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/6512744?tstart=0#6512744</guid>
      <dc:date>2014-07-01T11:46:37Z</dc:date>
      <clearspace:dateToText>4 months 2 weeks ago</clearspace:dateToText>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Re: How to convert minutes to decimal</title>
      <link>https://forums.adobe.com/message/6510217?tstart=0#6510217</link>
      <description>&lt;!-- [DocumentBodyStart:4062c917-0714-4efb-b85b-91e908ce9d9b] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;blockquote class="jive-quote"&gt;
&lt;p&gt;How do I do this?&lt;/p&gt;

&lt;/blockquote&gt;&lt;p&gt;The simple answer: with math. &lt;span aria-label="Wink" class="emoticon-inline emoticon_wink" style="height:16px;width:16px;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Longer answer: parse it using list functions and then do some math.&amp;nbsp; Like this:&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;!--[CodeBlockStart:8da690d5-7aa7-4ca3-ad49-b87e163fbd7a][excluded]--&gt;&lt;pre class="plain" name="code"&gt;
&amp;lt;cfset MyTime = "43:15"&amp;gt;
&amp;lt;cfset hours = ListFirst(MyTime, ":") &amp;gt; &amp;lt;!--- get the hours part ---&amp;gt;
&amp;lt;cfset minutes = ListLast(MyTime, ":") &amp;gt; &amp;lt;!--- get the minutes part ---&amp;gt;
&amp;lt;cfset decimalMinutes = minutes / 60 &amp;gt; &amp;lt;!--- Calculate minutes as decimal of an hour ---&amp;gt;
&amp;lt;cfset MyDecimalTime = hours + decimalMinutes &amp;gt; &amp;lt;!--- Put it all back together as decimal hours ---&amp;gt;
&lt;/pre&gt;&lt;!--[CodeBlockEnd:8da690d5-7aa7-4ca3-ad49-b87e163fbd7a]--&gt;&lt;div style="display:none;"&gt;&lt;/div&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Or, in more terse form:&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;!--[CodeBlockStart:b840e425-3d6d-463c-8d39-aca1ee351505][excluded]--&gt;&lt;pre class="plain" name="code"&gt;
&amp;lt;cfset MyTime = "43:15"&amp;gt;
&amp;lt;cfset MyDecimalTime = ListFirst(MyTime, ":") + (ListLast(MyTime, ":") / 60) &amp;gt;
&lt;/pre&gt;&lt;!--[CodeBlockEnd:b840e425-3d6d-463c-8d39-aca1ee351505]--&gt;&lt;div style="display:none;"&gt;&lt;/div&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;HTH,&lt;/p&gt;&lt;p&gt;-Carl V.&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:4062c917-0714-4efb-b85b-91e908ce9d9b] --&gt;</description>
      <pubDate>Mon, 30 Jun 2014 16:42:44 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/6510217?tstart=0#6510217</guid>
      <dc:date>2014-06-30T16:42:44Z</dc:date>
      <clearspace:dateToText>4 months 2 weeks ago</clearspace:dateToText>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>How to convert minutes to decimal</title>
      <link>https://forums.adobe.com/message/6510203?tstart=0#6510203</link>
      <description>&lt;!-- [DocumentBodyStart:09039459-a8fe-49e3-96a2-9fe5c408ecda] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;I need to convert my minutes in my HH:MM record to decimal.&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;For example if I have 43 hours and 15 minutes (43:15) I need to return the result 43.25 hours&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;and if i have 10 hours and 30 minutes I need to return 10.50 hours.&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;How do I do this?&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:09039459-a8fe-49e3-96a2-9fe5c408ecda] --&gt;</description>
      <pubDate>Mon, 30 Jun 2014 16:16:50 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/6510203?tstart=0#6510203</guid>
      <dc:date>2014-06-30T16:16:50Z</dc:date>
      <clearspace:dateToText>4 months 2 weeks ago</clearspace:dateToText>
      <clearspace:replyCount>2</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
  </channel>
</rss>

