<?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: Time calculation: result field stays empty</title><link>https://www.infopathdev.com:443/forums/thread/65904.aspx</link><pubDate>Wed, 13 Apr 2011 20:28:49 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:65904</guid><dc:creator>Alec Pojidaev</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/65904.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=65904</wfw:commentRss><description>&lt;p&gt;Try forms in this blog:&lt;/p&gt;&lt;p&gt;&lt;a href="http://alecpojidaev.wordpress.com/2008/12/30/infopath-codeless-programming-walkthrough-2/"&gt;http://alecpojidaev.wordpress.com/2008/12/30/infopath-codeless-programming-walkthrough-2/&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Time calculation: result field stays empty</title><link>https://www.infopathdev.com:443/forums/thread/65894.aspx</link><pubDate>Wed, 13 Apr 2011 13:18:22 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:65894</guid><dc:creator>Emilio111</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/65894.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=65894</wfw:commentRss><description>&lt;p&gt;Hello to everyone,&lt;/p&gt;
&lt;p&gt;i&amp;#39;m trying to get a time calculation&amp;nbsp;using no code with 3&amp;nbsp;(text-)fields.&lt;/p&gt;
&lt;p&gt;The first is starttime using the conditions: itself not empty,&amp;nbsp;endtime not empty, starttime is like 00:00:00&lt;/p&gt;
&lt;p&gt;The following rule is implemented:&lt;/p&gt;
&lt;p&gt;(((number(substring(../my:endtime, 1, 2)) * 3600) + (number(substring(../my:endtime, 4, 2)) * 60)) - ((number(substring(., 1, 2)) * 3600) + (number(substring(., 4, 2)) * 60))) div 60&lt;/p&gt;
&lt;p&gt;The second is endtime, containing the similar conditions as starttime and has this rule:&lt;/p&gt;
&lt;p&gt;(((number(substring(., 1, 2)) * 3600) + (number(substring(., 4, 2)) * 60)) - ((number(substring(../my:starttime, 1, 2)) * 3600) + (number(substring(../my:starttime, 4, 2)) * 60))) div 60&lt;/p&gt;
&lt;p&gt;The thrid field (result) is the target for the rules settings.&lt;/p&gt;
&lt;p&gt;The first test was fine, it worked properly. But it only worked for one time! Everytime i enter values in starttime or endtime&amp;nbsp;the result field stays empty - it drives me mad!&lt;/p&gt;
&lt;p&gt;So if anyone as any idea - please do not let my die stupid!&lt;/p&gt;
&lt;p&gt;Best regards&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Emilio111&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>