<?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>Browser Forms</title><link>https://www.infopathdev.com:443/forums/40.aspx</link><description>For browser form specific questions</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Using Xpath to display only the year?</title><link>https://www.infopathdev.com:443/forums/thread/30769.aspx</link><pubDate>Thu, 24 Jul 2008 09:20:30 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:30769</guid><dc:creator>kimospeed</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/30769.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=30769</wfw:commentRss><description>&lt;p&gt;Wow, it works for me as well.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;thanks guys.&lt;/p&gt;</description></item><item><title>Re: Using Xpath to display only the year?</title><link>https://www.infopathdev.com:443/forums/thread/30551.aspx</link><pubDate>Thu, 17 Jul 2008 18:57:09 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:30551</guid><dc:creator>jrudolph</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/30551.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=30551</wfw:commentRss><description>&lt;p&gt;Thank you very much.&amp;nbsp; That worked perfectly.&amp;nbsp; I need to spend some time and play with all these different functions.&lt;/p&gt;</description></item><item><title>Re: Using Xpath to display only the year?</title><link>https://www.infopathdev.com:443/forums/thread/30550.aspx</link><pubDate>Thu, 17 Jul 2008 18:54:26 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:30550</guid><dc:creator>RLPopeIII</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/30550.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=30550</wfw:commentRss><description>&lt;p&gt;If your dates are in the InfoPath standard format, you can use the text function &lt;em&gt;substring-before&lt;/em&gt;.&amp;nbsp;The date prints out yyyy-mm-dd in a text box.&amp;nbsp; The substring&lt;em&gt;-before&lt;/em&gt; function will output&amp;nbsp;all of the text before a certain character.&amp;nbsp;The way to use it:&lt;/p&gt;
&lt;p&gt;substring-before(DateField, &amp;quot;-&amp;quot;).&amp;nbsp; DateField is the field that has your date data.&amp;nbsp; The dash let&amp;#39;s InfoPath know to stop at the dash and not add the month or day.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Hope this helps,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Ren&lt;/p&gt;</description></item><item><title>Re: Using Xpath to display only the year?</title><link>https://www.infopathdev.com:443/forums/thread/30549.aspx</link><pubDate>Thu, 17 Jul 2008 18:48:09 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:30549</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/30549.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=30549</wfw:commentRss><description>&lt;p&gt;Hello, and welcome! First change your text box to contain text rather than a date, since we will only have part of the date in there.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div&gt;Right click your text box and select properties&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;For &lt;strong&gt;Data Type&lt;/strong&gt;, select &lt;strong&gt;Text(string)&lt;/strong&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Select the formula button next to the &lt;strong&gt;Value &lt;/strong&gt;box in the &lt;strong&gt;Default Value&lt;/strong&gt; section &lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Select &lt;strong&gt;Insert Function&lt;/strong&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Select &lt;strong&gt;substring-before&lt;/strong&gt; (in the &lt;strong&gt;Text&lt;/strong&gt; functions)&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;For the first field, put in the field with the date your want or the function &lt;strong&gt;today()&lt;/strong&gt; for today&amp;#39;s date&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;After the comma, put in &amp;quot;-&amp;quot;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;Your final formula should look like this (if you are wanting the year for today&amp;#39;s date):&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;substring-before(today(), &amp;quot;-&amp;quot;)&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Click &lt;strong&gt;OK&lt;/strong&gt; until all dialogs close and open your form in preview to test.&lt;/p&gt;
&lt;p&gt;The substring-before function takes all the characters in the first string (today() in our case) up to the first occurance of the character in the second string (the hyphen, for us). Since today() returns a date formatted as: &amp;quot;2008-07-16&amp;quot;, taking everything before the first hyphen returns the year.&lt;/p&gt;
&lt;p&gt;Let me know if you have trouble with this, okay?&lt;/p&gt;</description></item><item><title>Using Xpath to display only the year?</title><link>https://www.infopathdev.com:443/forums/thread/30548.aspx</link><pubDate>Thu, 17 Jul 2008 18:27:36 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:30548</guid><dc:creator>jrudolph</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/30548.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=30548</wfw:commentRss><description>&lt;p&gt;I am very new to everything XML and InfoPath.&amp;nbsp; I have a need to have a text box&amp;nbsp;which, by default, will automatically displays only the current year, not the full date.&amp;nbsp; I have very limited knowledge of how to use the Xpath feature when setting the default formula. The text box properties are currently to: Data type: Date.&lt;/p&gt;
&lt;p&gt;I hope this makes since, any help would greatly be appreciated.&lt;/p&gt;</description></item></channel></rss>