<?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: XPath and Date Comparisons</title><link>https://www.infopathdev.com:443/forums/thread/102268.aspx</link><pubDate>Wed, 22 Apr 2015 16:39:50 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:102268</guid><dc:creator>Michael71</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/102268.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=102268</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Can you post your answer for other InfoPath Developers?&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Michael&lt;/p&gt;</description></item><item><title>Re: XPath and Date Comparisons</title><link>https://www.infopathdev.com:443/forums/thread/59055.aspx</link><pubDate>Mon, 20 Sep 2010 20:51:21 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:59055</guid><dc:creator>Pinback</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/59055.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=59055</wfw:commentRss><description>&lt;p&gt;Sorry it took me so long to get back to this, but I finally did today.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;It worked!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you all so much for your help on this one. :)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Pinback&lt;/p&gt;</description></item><item><title>Re: XPath and Date Comparisons</title><link>https://www.infopathdev.com:443/forums/thread/58000.aspx</link><pubDate>Sat, 14 Aug 2010 14:48:28 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:58000</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/58000.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=58000</wfw:commentRss><description>&lt;p&gt;Cool.&lt;/p&gt;
&lt;p&gt;Potemkine is right; you can&amp;#39;t directly use &amp;gt; or &amp;lt; with dates and if you&amp;#39;re&amp;nbsp;writing&amp;nbsp;code you&amp;#39;ll need to do something to strip out the punctuation, like in the example Potemkine has given.&lt;/p&gt;
&lt;p&gt;In rules, conditional formatting, etc. inside the InfoPath designer,&amp;nbsp;you can use &lt;a href="http://msdn.microsoft.com/en-us/library/ms256114.aspx"&gt;msxsl:string-compare()&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;nbsp;dfs:myFields/dfs:dataFields/dfs:Requests[msxsl:string-compare(@Begin_Date, &amp;#39;1978-06-01&amp;#39;) = 1] &lt;/p&gt;&lt;/blockquote&gt;</description></item><item><title>Re: XPath and Date Comparisons</title><link>https://www.infopathdev.com:443/forums/thread/57997.aspx</link><pubDate>Sat, 14 Aug 2010 13:39:29 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:57997</guid><dc:creator>Pinback</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/57997.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=57997</wfw:commentRss><description>&lt;p&gt;Jimmy,&lt;/p&gt;
&lt;p&gt;Thanks! You are correct...there is no &amp;quot;need&amp;quot; for my date to be formatted any particular way. I just want to get it to work. :)&lt;/p&gt;
&lt;p&gt;Potemkine,&lt;/p&gt;
&lt;p&gt;Thank you for this, I will try it first thing Monday morning.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Pinback&lt;/p&gt;</description></item><item><title>Re: XPath and Date Comparisons</title><link>https://www.infopathdev.com:443/forums/thread/57995.aspx</link><pubDate>Sat, 14 Aug 2010 12:55:35 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:57995</guid><dc:creator>Potemkine</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/57995.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=57995</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi Pinback, by default greater than or less than(&amp;lt;&amp;gt;) just don&amp;#39;t work on string. You have to convert your @begin_date as a date or number. I have some good result if I convert them as number here my filter :&lt;/p&gt;&lt;p&gt;[number(translate(translate(translate(.,&amp;#39;-&amp;#39;,&amp;#39;&amp;#39;),&amp;#39; &amp;#39;,&amp;#39;&amp;#39;),&amp;#39;:&amp;#39;,&amp;#39;&amp;#39;)) &amp;gt; number(&amp;#39;19780601000000&amp;#39;)]. As you see I concatenate your 2 variables to make a big number, so it&amp;#39;s important to have exactly the same format.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: XPath and Date Comparisons</title><link>https://www.infopathdev.com:443/forums/thread/57993.aspx</link><pubDate>Sat, 14 Aug 2010 03:45:14 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:57993</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/57993.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=57993</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;Pinback:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;I need &amp;quot;2010-06-01 00:00:00&amp;quot; and &amp;#39;#6/1/1978#&amp;#39; to both be recognized as dates so that I can do a comparison. When I run it now, I get a 0 Node Count where of course 2010 is greater than 1978. Any thoughts on what I am doing wrong?&lt;/div&gt;&lt;/BLOCKQUOTE&gt; 
&lt;p&gt;Why do you &amp;quot;need&amp;quot; to use a date format like&amp;nbsp;#6/1/1978#?&amp;nbsp; XML dates are of the format &lt;strong&gt;YYYY-MM-DD&lt;/strong&gt; followed by &lt;strong&gt;Thh:mm:ss&lt;/strong&gt; if the time is included.&amp;nbsp; &lt;strong&gt;@Begin_Date &amp;gt; &amp;#39;1978-06-01&amp;#39;&lt;/strong&gt; should find you the dates you are looking for.&lt;/p&gt;</description></item><item><title>Re: XPath and Date Comparisons</title><link>https://www.infopathdev.com:443/forums/thread/57990.aspx</link><pubDate>Sat, 14 Aug 2010 01:20:59 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:57990</guid><dc:creator>Pinback</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/57990.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=57990</wfw:commentRss><description>&lt;p&gt;Thanks Patrick,&lt;/p&gt;
&lt;p&gt;Unfortunately, it is not up to me what software my&amp;nbsp;organization uses, so I need to seek an XPath solution.&lt;/p&gt;
&lt;p&gt;Anyone have an idea? :)&lt;/p&gt;
&lt;p&gt;When&amp;nbsp;I try to embed a function to do the work (example &lt;font face="Courier New"&gt;fn:year-from-dateTime), I get told it is an unknown function. I&amp;#39;ve tried 10 different functions...same result.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;Thanks in advance,&lt;/p&gt;
&lt;p&gt;Pinback&lt;/p&gt;</description></item><item><title>Re: XPath and Date Comparisons</title><link>https://www.infopathdev.com:443/forums/thread/57989.aspx</link><pubDate>Fri, 13 Aug 2010 22:45:20 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:57989</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/57989.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=57989</wfw:commentRss><description>&lt;p&gt;Hi Pinback,&lt;/p&gt;
&lt;p&gt;We&amp;#39;ve had so many questions about dates that we finally decided to add a Date Diff function to &lt;a title="qRules" href="http://www.qdabra.com/en/products/qRules.aspx"&gt;qRules v2.2&lt;/a&gt;&amp;nbsp;(also now includes Format Date). You can add qRules to forms which already have code too: &lt;a href="http://www.infopathdev.com/files/folders/qrules/entry56111.aspx"&gt;http://www.infopathdev.com/files/folders/qrules/entry56111.aspx&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;Qdabra pays for this free forum and one way we defray the cost is by selling inexpensive tools like qRules. The trial download is free and you can get a discount on the $199 price if you send us a 3-4 sentence testimonial of how you liked it. &lt;/p&gt;
&lt;p&gt;Thanks for your support,&lt;/p&gt;</description></item><item><title>XPath and Date Comparisons</title><link>https://www.infopathdev.com:443/forums/thread/57988.aspx</link><pubDate>Fri, 13 Aug 2010 19:53:01 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:57988</guid><dc:creator>Pinback</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/57988.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=57988</wfw:commentRss><description>&lt;p&gt;Hello again great forum,&lt;/p&gt;
&lt;p&gt;NI is a XPathNodeIterator&lt;br /&gt;DOM is a XPathNavigator&lt;/p&gt;
&lt;p&gt;NI = DOM.Select(&amp;quot;/dfs:myFields/dfs:dataFields/dfs:Requests[@Begin_Date &amp;gt; &amp;#39;#6/1/1978#&amp;#39; ]&amp;quot;, Me.NamespaceManager)&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In the InnerXML, Begin_Date looks like this:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;Begin_Date=&amp;quot;2010-06-01 00:00:00&amp;quot;&lt;/p&gt;
&lt;p&gt;I need &amp;quot;2010-06-01 00:00:00&amp;quot; and &amp;#39;#6/1/1978#&amp;#39; to both be recognized as dates so that I can do a comparison. When I run it now, I get a 0 Node Count where of course 2010 is greater than 1978. Any thoughts on what I am doing wrong?&lt;/p&gt;
&lt;p&gt;Thanks in advance,&lt;/p&gt;
&lt;p&gt;Pinback&lt;/p&gt;</description></item></channel></rss>