<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Newbie Questions</title><link>https://www.infopathdev.com:443/forums/39.aspx</link><description>New to InfoPath? Search to see if your question has already been answered. If it has not, then ask it here or the appropriate topic forum.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Calculating the Sum of a Time Field</title><link>https://www.infopathdev.com:443/forums/thread/25961.aspx</link><pubDate>Sun, 27 Jan 2008 00:00:11 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:25961</guid><dc:creator>adamrharding</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/25961.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=25961</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi&lt;/p&gt;&lt;p&gt;Welcome to the forums.&lt;/p&gt;&lt;p&gt;First thing, 15 minutes plus 35 minutes is 50 minutes plus one hour is 1h 50 but it doesn&amp;#39;t matter either way I know what your problem is.&lt;/p&gt;&lt;p&gt;It is the fact that the fact that InfoPath adds only&amp;nbsp; cannot natively convert hours and minutes into just minutes to calculate the time.&amp;nbsp; The Blog details how to get hours into minutes and then calculate the difference, the only difference is you will want to convert dates as well so each day * 24 then * 60 to give minutes then take one from the other as the blod details and it will work fine.&lt;/p&gt;&lt;p&gt;What you need to make sure is that your Total Time Taken field is also not in the same table as the Time Taken.&amp;nbsp; It needs to be in a table 1 if the Time Taken is in table 2 with tables one and two on a one-to-many relationship respectively like this:&lt;/p&gt;&lt;p&gt;&lt;img src="http://blogs.msdn.com/blogfiles/infopath/WindowsLiveWriter/CalculatingElapsedTimewithoutcode_9076/image%5B4%5D.png" title="Relationship description" alt="Relationship description" align="left" height="210" width="234" /&gt;&lt;/p&gt;&lt;p&gt;Here the total time field belongs in group1 but the rest of hte fields belong in group2 a subsisdiary of group1.&amp;nbsp; That way the sum function will work.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Cheers&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;img alt="" /&gt;&lt;img alt="" /&gt; &lt;/p&gt;</description></item><item><title>Calculating the Sum of a Time Field</title><link>https://www.infopathdev.com:443/forums/thread/25955.aspx</link><pubDate>Sat, 26 Jan 2008 16:57:40 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:25955</guid><dc:creator>boyemillar</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/25955.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=25955</wfw:commentRss><description>&lt;p&gt;I have created a DB in MSSQL and a couple of forms in Infopath 2003 &lt;/p&gt;
&lt;p&gt;The problem form retrieves the info from the MSSQL database and puts it in a repeating table and i can run queries to show only the relevant data but the main purpose of the form is to get who took the longest or shortest time per task or day or Activity.&lt;/p&gt;
&lt;p&gt;eg..&lt;/p&gt;
&lt;p&gt;Date&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;| TIME Taken | Activity&lt;/p&gt;
&lt;p&gt;1-Jan-2003&amp;nbsp; | Jim&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | 00:15&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | Invoicing&lt;/p&gt;
&lt;p&gt;4-Jan-2003&amp;nbsp; |&amp;nbsp;Tony&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;| 00:35&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | Labelling&lt;/p&gt;
&lt;p&gt;7-Jan-2003&amp;nbsp; | Jim&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | 01:00&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | Invoicing&lt;/p&gt;
&lt;p&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 01:40&amp;nbsp; - - - Total Time Taken&lt;/p&gt;
&lt;p&gt;The problem is when i try to calculate the Sum of the Time&amp;nbsp;taken it gives a (1.#QNAN) error.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have tried the Infopath Blog &amp;nbsp;&amp;nbsp;&lt;a href="http://blogs.msdn.com/infopath/archive/2007/02/21/calculating-elapsed-time-without-code.aspx"&gt;http://blogs.msdn.com/infopath/archive/2007/02/21/calculating-elapsed-time-without-code.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;But that didnt work just wondering if im doing something wrong or if the fact that MSSQL store additional irrelevant info such as the date field i enter gets a time assigned (00:00) and the time field gets a Date assigned even thoug i dont use those parts could they be affecting the calculation.&lt;/p&gt;</description></item></channel></rss>