<?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: set date and time to display in mm/dd/yyyy hh:mm:ss AM/PM format in textbox</title><link>https://www.infopathdev.com:443/forums/thread/73509.aspx</link><pubDate>Thu, 05 Jan 2012 06:16:37 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:73509</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/73509.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=73509</wfw:commentRss><description>&lt;p&gt;Well, this is the formula I came up with based on your original question:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;concat(substring(field1, 6, 2), &amp;quot;/&amp;quot;, substring(field1, 9, 2), &amp;quot;/&amp;quot;, substring(field1, 1, 4), &amp;quot; &amp;quot;, substring(&amp;quot;0&amp;quot;, 1, substring(field2, 1, 2) mod 12 + 12 * (substring(field2, 1, 2) mod 12 = 0) &amp;lt; 10), substring(field2, 1, 2) mod 12 + 12 * (substring(field2, 1, 2) mod 12 = 0), substring(field2, 3, 6), &amp;quot; &amp;quot;, substring(&amp;quot;AP&amp;quot;, 1 + (substring(field2, 1, 2) &amp;gt;= 12), 1), &amp;quot;M&amp;quot;)&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Why can&amp;#39;t you change the data type of the field?&lt;/p&gt;</description></item><item><title>Re: set date and time to display in mm/dd/yyyy hh:mm:ss AM/PM format in textbox</title><link>https://www.infopathdev.com:443/forums/thread/73506.aspx</link><pubDate>Thu, 05 Jan 2012 04:41:14 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:73506</guid><dc:creator>venkatzeus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/73506.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=73506</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi,&lt;/p&gt;&lt;p&gt;Thank you very much for the reply.&lt;/p&gt;&lt;p&gt;Data type of the textbox is text(string)&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Could you please provide the format code for using with now() to show in mm/dd/yyyy hh:mm:ss AM/PM format.&amp;nbsp; &lt;/p&gt;&lt;p&gt;Thank you &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: set date and time to display in mm/dd/yyyy hh:mm:ss AM/PM format in textbox</title><link>https://www.infopathdev.com:443/forums/thread/73461.aspx</link><pubDate>Wed, 04 Jan 2012 16:19:20 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:73461</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/73461.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=73461</wfw:commentRss><description>&lt;p&gt;Why not just have the default value as &lt;strong&gt;now()&lt;/strong&gt;, and use the formatting options to display it the way you want it?&lt;/p&gt;</description></item><item><title>Re: set date and time to display in mm/dd/yyyy hh:mm:ss AM/PM format in textbox</title><link>https://www.infopathdev.com:443/forums/thread/73460.aspx</link><pubDate>Wed, 04 Jan 2012 16:08:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:73460</guid><dc:creator>venkatzeus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/73460.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=73460</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi,&lt;/p&gt;&lt;p&gt;Tried like this:&lt;/p&gt;&lt;p&gt;concat(substring(xdDate:Today(), 6, 2), &amp;quot;/&amp;quot;, substring(xdDate:Today(), 
9, 2), &amp;quot;/&amp;quot;, substring(xdDate:Today(), 1, 4), &amp;quot; &amp;quot;, 
substring-after(xdDate:Now(), &amp;quot;T&amp;quot;)) &lt;/p&gt;&lt;p&gt;&amp;nbsp;and it is giving result.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;However, AM/PM is not shown.. Is it possible to add the AM/PM with the above formula.&lt;/p&gt;&lt;p&gt;&amp;nbsp;Thank you&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: set date and time to display in mm/dd/yyyy hh:mm:ss AM/PM format in textbox</title><link>https://www.infopathdev.com:443/forums/thread/73459.aspx</link><pubDate>Wed, 04 Jan 2012 15:57:32 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:73459</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/73459.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=73459</wfw:commentRss><description>&lt;p&gt;Simply change the formula to:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;concat(field1, &amp;#39;T&amp;#39;, field2)&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Then you can use the formatting options to show it the way you like.&lt;/p&gt;</description></item><item><title>set date and time to display in mm/dd/yyyy hh:mm:ss AM/PM format in textbox</title><link>https://www.infopathdev.com:443/forums/thread/73457.aspx</link><pubDate>Wed, 04 Jan 2012 15:18:37 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:73457</guid><dc:creator>venkatzeus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/73457.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=73457</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;I have added 3 textboxes.
&lt;/p&gt;&lt;p&gt;one having date only. Another having time only.&lt;/p&gt;
&lt;p&gt;In the third textbox, i would like to have the concatenated value.&lt;/p&gt;
&lt;p&gt;First textbox - Data type as Date - shows result as : 01/04/2012&lt;/p&gt;
&lt;p&gt;Second textbox - Data type as Time -&amp;nbsp; shows result as : 06:57:11 AM ( i used this formula: substring-after(now(), &amp;quot;T&amp;quot;)&amp;nbsp; ) &lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Third textbox - Data type as Text(string). I have added the rule for concatenating as : concat(field1, field2)&lt;/p&gt;
&lt;p&gt;However the Third textbox is displaying result as : 2012-01-0406:57:11&lt;/p&gt;
&lt;p&gt;I need to show in the third textbox as : 01/04/2012 06:57:11 AM&lt;/p&gt;
&lt;p&gt;How to achieve this?&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;</description></item></channel></rss>