<?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>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: current year function to filter by current year</title><link>https://www.infopathdev.com:443/forums/thread/14909.aspx</link><pubDate>Tue, 28 Nov 2006 00:53:51 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14909</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14909.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14909</wfw:commentRss><description>Glad you were able to get this resolved!</description></item><item><title>Re: current year function to filter by current year</title><link>https://www.infopathdev.com:443/forums/thread/14908.aspx</link><pubDate>Wed, 22 Nov 2006 20:54:05 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14908</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14908.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14908</wfw:commentRss><description>Cool!</description></item><item><title>Re: current year function to filter by current year</title><link>https://www.infopathdev.com:443/forums/thread/14907.aspx</link><pubDate>Wed, 22 Nov 2006 20:13:35 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14907</guid><dc:creator>Michael71</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14907.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14907</wfw:commentRss><description>&lt;font size="3"&gt;&lt;font color="black"&gt;&lt;b&gt;Success&lt;/b&gt;&lt;/font id="black"&gt;&lt;/font id="size3"&gt;.....I found the code on the internet and edited the code. For future reference here is the Xpath to select a specific department and only the current year from an SQL Server database. I'm getting good.&lt;br /&gt;&lt;br /&gt;sum(xdXDocument:GetDOM("TOSSReceive")/dfs:myFields/dfs:dataFields/d:TOSS/@monthlyExpenses[../@employeeDepartment = xdXDocument:get-DOM()/dfs:myFields/dfs:dataFields/d:TOSS/@employeeDepartment and contains(../@expenseReportDate, substring(xdDate:Today(), 1, 4))])</description></item><item><title>Re: current year function to filter by current year</title><link>https://www.infopathdev.com:443/forums/thread/14906.aspx</link><pubDate>Wed, 22 Nov 2006 15:40:05 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14906</guid><dc:creator>Michael71</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14906.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14906</wfw:commentRss><description>Does anyone know the &lt;font color="black"&gt;&lt;font size="3"&gt;&lt;b&gt;Current Year Xpath function &lt;/b&gt;&lt;/font id="size3"&gt;&lt;/font id="black"&gt;for InfoPath?</description></item><item><title>Re: current year function to filter by current year</title><link>https://www.infopathdev.com:443/forums/thread/14905.aspx</link><pubDate>Tue, 21 Nov 2006 23:00:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14905</guid><dc:creator>Michael71</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14905.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14905</wfw:commentRss><description>Greg and InfoDev's,&lt;br /&gt;&lt;br /&gt;             I hard coded it, but need to find the Xpath that compares the current date. Here is the hard coded Xpath, and it just sums up for the expenseReportDate= "2006". If I can find the function that says current year in Xpath, I can solve it. Any help would be appreciated. Thanks.&lt;br /&gt;&lt;br /&gt;sum(xdXDocument:GetDOM("TOSSReceive")/dfs:myFields/dfs:dataFields/d:TOSS/@monthlyExpenses[../@employeeDepartment = xdXDocument:get-DOM()/dfs:myFields/dfs:dataFields/d:TOSS/@employeeDepartment and contains(../@&lt;b&gt;&lt;font size="2"&gt;expenseReportDate&lt;/font id="size2"&gt;&lt;/b&gt;, "&lt;b&gt;&lt;font size="3"&gt;2006&lt;/font id="size3"&gt;&lt;/b&gt;")])</description></item><item><title>Re: current year function to filter by current year</title><link>https://www.infopathdev.com:443/forums/thread/14904.aspx</link><pubDate>Tue, 21 Nov 2006 21:17:36 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14904</guid><dc:creator>Michael71</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14904.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14904</wfw:commentRss><description>Yes Greg, &lt;br /&gt;&lt;br /&gt;This does makes sense, but how do I only sum up monthly expenses for that current year. I'm guessing with a filter, but what type of Xpath for date do I include.</description></item><item><title>Re: current year function to filter by current year</title><link>https://www.infopathdev.com:443/forums/thread/14903.aspx</link><pubDate>Tue, 21 Nov 2006 21:14:02 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14903</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14903.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14903</wfw:commentRss><description>Keep in mind that the "display" of a date isn't necessarily representative of the stored value of the date. In InfoPath dates are stored in the sortable XML format: "yyyy-mm-dd" even if InfoPath displays them as "m/d/yyyy". So when working against a formatted date (or time or number) you must ignore the formatting and deal with the actual value stored in the field. Make sense?</description></item><item><title>current year function to filter by current year</title><link>https://www.infopathdev.com:443/forums/thread/12986.aspx</link><pubDate>Tue, 21 Nov 2006 20:52:45 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12986</guid><dc:creator>Michael71</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12986.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=12986</wfw:commentRss><description>How do I get the current year from a table that has dates in the 11/6/2006 Format. I'm trying to filter information only for the current year. I found a article about at &lt;br /&gt;&lt;br /&lt;a target="_blank" href=http://kjellsj.blogspot.com/2005/04/using-xpath-preceding-sibling-in.html&gt;http://kjellsj.blogspot.com/2005/04/using-xpath-preceding-sibling-in.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;however it did not work in the Xpath box.</description></item></channel></rss>