<?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: Time Calculation Issue With AddSeconds Function in Infopath 2010</title><link>https://www.infopathdev.com:443/forums/thread/92485.aspx</link><pubDate>Sun, 25 Aug 2013 23:06:11 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:92485</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/92485.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=92485</wfw:commentRss><description>&lt;p&gt;yes, you&amp;#39;ll need to substring before the time zone. see modified xsn attached.&lt;/p&gt;</description></item><item><title>Time Calculation Issue With AddSeconds Function in Infopath 2010</title><link>https://www.infopathdev.com:443/forums/thread/92395.aspx</link><pubDate>Wed, 21 Aug 2013 08:58:30 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:92395</guid><dc:creator>Cassie</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/92395.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=92395</wfw:commentRss><description>&lt;span style="COLOR:#333333;FONT-SIZE:10pt;"&gt;&lt;font face="Times New Roman"&gt;&lt;span style="FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;COLOR:#333333;FONT-SIZE:11pt;"&gt;&lt;/span&gt;&lt;span style="FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;COLOR:#333333;FONT-SIZE:11pt;"&gt;
&lt;p&gt;I have a template part with two fields, StartTime and EndTime.&amp;nbsp; They are formatted as time&amp;nbsp;in format 9:46.&lt;/p&gt;
&lt;p&gt;I have a calculated field&amp;nbsp;(&amp;quot;Total&amp;quot;) that is also fomatted in the same way.&amp;nbsp; The XPath expression for it is...&lt;/p&gt;
&lt;p&gt;xdDate:AddSeconds(my:EndTime, -1 * (substring(my:StartTime, 1, 2) * 3600 + substring(my:StartTime, 4, 2) * 60)) &lt;/p&gt;
&lt;p&gt;I type 1:00 for StartTime, and 2:00 for EndTime but the Total is 17:00 when it should be 1:00&lt;/p&gt;
&lt;p&gt;My computer&amp;#39;s regional settings say that we are (UTC+08:00).It seems like the AddSeconds function is taking 8 hours off my result.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Can&amp;nbsp;anyone plases advise on whether this is some sort of bug with the AddSeconds function or how the formula should be written using the AddSeconds function?&lt;/p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;</description></item></channel></rss>