<?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: Substr JScript</title><link>https://www.infopathdev.com:443/forums/thread/14950.aspx</link><pubDate>Thu, 14 Dec 2006 15:43:53 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14950</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14950.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14950</wfw:commentRss><description>Hi diabolche,&lt;br /&gt;&lt;br /&gt;Try this:&lt;br /&gt;&lt;br /&gt;var date = XDocument.DOM.selectSingleNode("//my:date1").text;   &lt;br /&gt;var annee = date.substring(0, 4);&lt;br /&gt;&lt;br /&lt;a target="_blank" href=http://msdn2.microsoft.com/en-gb/library/3cz15ahb.aspx&gt;http://msdn2.microsoft.com/en-gb/library/3cz15ahb.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I feel your pain on working in script editor without Intellisense - oh the agony!</description></item><item><title>Re: Substr JScript</title><link>https://www.infopathdev.com:443/forums/thread/14949.aspx</link><pubDate>Fri, 08 Dec 2006 10:30:49 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14949</guid><dc:creator>diaboloche</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14949.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14949</wfw:commentRss><description>Thanks for your reply,&lt;br /&gt;I work in the script editor, i don't have an intellisense&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;XDocument.UI.Alert(XDocument.DOM.selectSingleNode("//my:date1").TextNode);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Why the string is empty ? I don't understand... does not post anything...&lt;br /&gt;</description></item><item><title>Re: Substr JScript</title><link>https://www.infopathdev.com:443/forums/thread/14948.aspx</link><pubDate>Fri, 08 Dec 2006 09:45:48 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14948</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14948.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14948</wfw:commentRss><description>Hi Diabloche,&lt;br /&gt;Date isn't a string. You need a date.TextNode.substr or something like that (I forget the string object underneath but Intellisense should remember for you).</description></item><item><title>Substr JScript</title><link>https://www.infopathdev.com:443/forums/thread/13002.aspx</link><pubDate>Fri, 08 Dec 2006 09:29:06 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13002</guid><dc:creator>diaboloche</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13002.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13002</wfw:commentRss><description>Hi, &lt;br /&gt;&lt;br /&gt;sorry for my bad english...&lt;br /&gt;my problem is :&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt; var date = XDocument.DOM.selectSingleNode("//my:date1");   &lt;br /&gt;  var annee = date.substr(0, 4);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;the error is :&lt;br /&gt;&lt;br /&gt;Object doesn't support this property or method&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I don't understand...&lt;br /&gt;Help please...&lt;br /&gt;&lt;br /&gt;Thanks !</description></item></channel></rss>