<?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: How to perform subtract operation on textbox with time data type in Infopath forms 2007?</title><link>https://www.infopathdev.com:443/forums/thread/94176.aspx</link><pubDate>Thu, 07 Nov 2013 18:01:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:94176</guid><dc:creator>missieyohko</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/94176.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=94176</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/infopathdev/images/icon-quote.gif"&gt; &lt;strong&gt;Greg Collins:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;p&gt;This can be done using a complicated default value formula:&lt;/p&gt;concat(substring(100 + number(concat(&amp;quot;0&amp;quot;, substring(../my:Time2, 1, 2))) - number(concat(&amp;quot;0&amp;quot;, substring(../my:Time1, 1, 2))), 2, 2), &amp;quot;:&amp;quot;, substring(100 + number(concat(&amp;quot;0&amp;quot;, substring(../my:Time2, 4, 2))) - number(concat(&amp;quot;0&amp;quot;, substring(../my:Time1, 4, 2))), 2, 2), &amp;quot;:&amp;quot;, substring(100 + number(concat(&amp;quot;0&amp;quot;, substring(../my:Time2, 7, 2))) - number(concat(&amp;quot;0&amp;quot;, substring(../my:Time1, 7, 2))), 2, 2))&lt;p&gt;This assumes that Time2 is always intended to be greater than Time1. It will work if both Time1 and Time2 are blank, or if only Time2 is blank.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;&lt;p&gt;I&amp;#39;m sorry to revive a dead thread but I&amp;#39;m curious about some of this logic...&amp;nbsp; When I want to understand long equations I write them out step by step... So I hope this makes sense and if I&amp;#39;ve made an error please let me know where...&lt;/p&gt;&lt;p&gt;STARTTIME 12:00:00&lt;br /&gt;ENDTIME&amp;nbsp;&amp;nbsp; 13:00:00&lt;br /&gt;&lt;br /&gt;substring(100 + number(concat(&amp;quot;0&amp;quot;, substring(../my:EndTime, 1, 2))) - number(concat(&amp;quot;0&amp;quot;, substring(../my:StartTime, 1, 2))), 2, 2)&lt;br /&gt;substring(100 + number(concat(&amp;quot;0&amp;quot;, &amp;quot;03&amp;quot;&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; )) - number(concat(&amp;quot;0&amp;quot;, &amp;quot;02&amp;quot;&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; )), 2, 2)&lt;br /&gt;substring(100 + number(&amp;quot;003&amp;quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; ) - number(&amp;quot;002&amp;quot;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )), 2, 2)&lt;br /&gt;substring(100 + 3&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;&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; - 2&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;&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; ), 2, 2)&lt;br /&gt;substring(101&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;&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ), 2, 2)&lt;br /&gt;&amp;quot;01&amp;quot;&lt;/p&gt;&lt;p&gt;What was the point of concatenating &amp;quot;0&amp;quot; in the 3rd step?&lt;/p&gt;</description></item><item><title>Re: How to perform subtract operation on textbox with time data type in Infopath forms 2007?</title><link>https://www.infopathdev.com:443/forums/thread/66083.aspx</link><pubDate>Wed, 20 Apr 2011 20:51:09 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:66083</guid><dc:creator>qwerty</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/66083.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=66083</wfw:commentRss><description>Hi there,&lt;br /&gt;&lt;br /&gt;
If you have IP2007 + you can use the built in addSeconds(time, secondsToAdd) function. 10 hrs * 60 min * 60 sec = 36000 seconds, so the condition is &lt;b&gt;If endTime Is Not Equal To addSeconds(startTime, 36000).&lt;/b&gt; &lt;br /&gt;&lt;br /&gt;

If you have IP2003, you can hook up something similar with the formula above ^.&lt;br /&gt;&lt;br /&gt;

Hope this helps!</description></item><item><title>Re: How to perform subtract operation on textbox with time data type in Infopath forms 2007?</title><link>https://www.infopathdev.com:443/forums/thread/66053.aspx</link><pubDate>Wed, 20 Apr 2011 13:27:24 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:66053</guid><dc:creator>tafavorite</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/66053.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=66053</wfw:commentRss><description>&lt;p&gt;I have the same situation, just that I am trying to verify the time against an entry field. Here is what I have:&lt;/p&gt;
&lt;p&gt;Total hrs (10.0)&lt;/p&gt;
&lt;p&gt;Start (7:00)&lt;/p&gt;
&lt;p&gt;End (17:00)&lt;/p&gt;
&lt;p&gt;What I would like to do is make sure that when the user goes to enter the end time, that if verfies that (End - Start) = Total hrs. This way they will be notified after entry that they need to enter the correct time.&lt;/p&gt;</description></item><item><title>Re: How to perform subtract operation on textbox with time data type in Infopath forms 2007?</title><link>https://www.infopathdev.com:443/forums/thread/66036.aspx</link><pubDate>Tue, 19 Apr 2011 22:45:37 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:66036</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/66036.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=66036</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Glad to help&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: How to perform subtract operation on textbox with time data type in Infopath forms 2007?</title><link>https://www.infopathdev.com:443/forums/thread/64812.aspx</link><pubDate>Fri, 04 Mar 2011 07:27:04 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:64812</guid><dc:creator>chintan.desai</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/64812.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=64812</wfw:commentRss><description>Thx Greg,

Your given code was very useful. It satisfy my requirement.</description></item><item><title>Re: How to perform subtract operation on textbox with time data type in Infopath forms 2007?</title><link>https://www.infopathdev.com:443/forums/thread/64750.aspx</link><pubDate>Wed, 02 Mar 2011 16:11:02 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:64750</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/64750.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=64750</wfw:commentRss><description>&lt;p&gt;This can be done using a complicated default value formula:&lt;/p&gt;concat(substring(100 + number(concat(&amp;quot;0&amp;quot;, substring(../my:Time2, 1, 2))) - number(concat(&amp;quot;0&amp;quot;, substring(../my:Time1, 1, 2))), 2, 2), &amp;quot;:&amp;quot;, substring(100 + number(concat(&amp;quot;0&amp;quot;, substring(../my:Time2, 4, 2))) - number(concat(&amp;quot;0&amp;quot;, substring(../my:Time1, 4, 2))), 2, 2), &amp;quot;:&amp;quot;, substring(100 + number(concat(&amp;quot;0&amp;quot;, substring(../my:Time2, 7, 2))) - number(concat(&amp;quot;0&amp;quot;, substring(../my:Time1, 7, 2))), 2, 2))&lt;p&gt;This assumes that Time2 is always intended to be greater than Time1. It will work if both Time1 and Time2 are blank, or if only Time2 is blank.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: How to perform subtract operation on textbox with time data type in Infopath forms 2007?</title><link>https://www.infopathdev.com:443/forums/thread/64740.aspx</link><pubDate>Wed, 02 Mar 2011 11:31:06 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:64740</guid><dc:creator>ErnestoM</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/64740.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=64740</wfw:commentRss><description>&lt;p&gt;Hi Chintan,&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.qdabra.com/en/products/qRules.aspx"&gt;qRules &lt;/a&gt;does this via the DateDiff command, and in fact there is an example in the documentation included in the trial.&lt;/p&gt;&lt;p&gt;The other option is to write custom code.&lt;/p&gt;&lt;p&gt;Good luck! &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: How to perform subtract operation on textbox with time data type in Infopath forms 2007?</title><link>https://www.infopathdev.com:443/forums/thread/64739.aspx</link><pubDate>Wed, 02 Mar 2011 11:28:30 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:64739</guid><dc:creator>ErnestoM</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/64739.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=64739</wfw:commentRss><description>&lt;p&gt;Hi Chintan,&lt;/p&gt;&lt;p&gt;You can do this via custom code, or use the DateDiff command in &lt;a href="http://www.qdabra.com/en/products/qRules.aspx"&gt;qRules&lt;/a&gt;. The documentation included in the trial contains an example of DateDiff! &lt;/p&gt;&lt;p&gt;Good luck.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>How to perform subtract operation on textbox with time data type in Infopath forms 2007?</title><link>https://www.infopathdev.com:443/forums/thread/64692.aspx</link><pubDate>Tue, 01 Mar 2011 14:11:49 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:64692</guid><dc:creator>chintan.desai</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/64692.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=64692</wfw:commentRss><description>Hi Folks,

I am having 2 text box - Time1 &amp;amp; Time2 with time data type (HH:MM 24hrs format).

I need to do subtract operation between Time2 and Time1. 

Example: Time2:19:30 &amp;amp; Time1:19:00. So, Time2 - Time1. Result: 00:30.

Please guide.

Thanks.
Chintan</description></item></channel></rss>