<?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>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Adding 2 time fields together</title><link>https://www.infopathdev.com:443/forums/thread/106728.aspx</link><pubDate>Sun, 22 May 2016 22:45:28 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:106728</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/106728.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=106728</wfw:commentRss><description>&lt;p&gt;I recommend adding a rule to strip out the formatting from the text boxes using translate(StartTime, &amp;quot;T-:&amp;quot;, &amp;quot;&amp;quot;) and set the result to a secondary StartTime2 (or EndTime2). Then you should be able to calculate the difference more easily since there are no formatting characters.&lt;/p&gt;</description></item><item><title>Adding 2 time fields together</title><link>https://www.infopathdev.com:443/forums/thread/106715.aspx</link><pubDate>Fri, 20 May 2016 18:15:37 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:106715</guid><dc:creator>RisingsunND</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/106715.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=106715</wfw:commentRss><description>I am trying to add 2 time fields together to get a total time. Here are the 2 fields default values that I am adding together. The formula verifies but when I preview the form the field displays NaN.
concat(substring(100 + number(concat(&amp;quot;0&amp;quot;, substring(EndTime, 1, 2))) - number(concat(&amp;quot;0&amp;quot;, substring(EndTime, 1, 2))), 2, 2), &amp;quot;:&amp;quot;, substring(100 + number(concat(&amp;quot;0&amp;quot;, substring(EndTime, 4, 2))) - number(concat(&amp;quot;0&amp;quot;, substring(StartTime, 4, 2))), 2, 2), &amp;quot;:&amp;quot;, substring(100 + number(concat(&amp;quot;0&amp;quot;, substring(EndTime, 7, 2))) - number(concat(&amp;quot;0&amp;quot;, substring(StartTime, 7, 2))), 2, 2)) + concat(substring(100 + number(concat(&amp;quot;0&amp;quot;, substring(FromEnd, 1, 2))) - number(concat(&amp;quot;0&amp;quot;, substring(FromStart, 1, 2))), 2, 2), &amp;quot;:&amp;quot;, substring(100 + number(concat(&amp;quot;0&amp;quot;, substring(FromEnd, 4, 2))) - number(concat(&amp;quot;0&amp;quot;, substring(FromStart, 4, 2))), 2, 2), &amp;quot;:&amp;quot;, substring(100 + number(concat(&amp;quot;0&amp;quot;, substring(FromEnd, 7, 2))) - number(concat(&amp;quot;0&amp;quot;, substring(FromStart, 7, 2))), 2, 2))

The 2 fields I am trying to add together are text box with Time data types, the field that I am trying to display the above formula in is text box with data type Text(string).


Not sure how to fix it.</description></item></channel></rss>