<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Date from UserForm as input to SQL Query in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/date-from-userform-as-input-to-sql-query/m-p/634556#M17102</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am just wondering how to place the values from my userform into the IQueryDescription SQL code.&amp;nbsp; I know this is a pretty entry question, but am just held up at this last step.&amp;nbsp; Currently, the FM_DATE has hard values in it, but I want to replace these with the TimeStart and TimeEnd userform input.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt; 
Dim TimeStart As Date
Dim TimeEnd As Date

TimeStart = Me.Time1.Value
TimeEnd = Me.Time2.Value

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim queryDescription As IQueryDescription = sqlWorkspace.GetQueryDescription("SELECT DCS_Fact.FM_DATE FROM DCS_Fact INNER JOIN TIBURON.INMAST ON DCS_Fact.DR = TIBURON.INMAST.IM_DR WHERE (DCS_Fact.FM_DATE &amp;gt;= '2012-01-01') AND (DCS_Fact.FM_DATE &amp;lt;= '2012-12-31')")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim queryClass As ITable = sqlWorkspace.OpenQueryClass("Parcels", queryDescription)&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Jun 2013 18:53:32 GMT</pubDate>
    <dc:creator>BrianBaldwin1</dc:creator>
    <dc:date>2013-06-06T18:53:32Z</dc:date>
    <item>
      <title>Date from UserForm as input to SQL Query</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/date-from-userform-as-input-to-sql-query/m-p/634556#M17102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am just wondering how to place the values from my userform into the IQueryDescription SQL code.&amp;nbsp; I know this is a pretty entry question, but am just held up at this last step.&amp;nbsp; Currently, the FM_DATE has hard values in it, but I want to replace these with the TimeStart and TimeEnd userform input.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt; 
Dim TimeStart As Date
Dim TimeEnd As Date

TimeStart = Me.Time1.Value
TimeEnd = Me.Time2.Value

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim queryDescription As IQueryDescription = sqlWorkspace.GetQueryDescription("SELECT DCS_Fact.FM_DATE FROM DCS_Fact INNER JOIN TIBURON.INMAST ON DCS_Fact.DR = TIBURON.INMAST.IM_DR WHERE (DCS_Fact.FM_DATE &amp;gt;= '2012-01-01') AND (DCS_Fact.FM_DATE &amp;lt;= '2012-12-31')")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim queryClass As ITable = sqlWorkspace.OpenQueryClass("Parcels", queryDescription)&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jun 2013 18:53:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/date-from-userform-as-input-to-sql-query/m-p/634556#M17102</guid>
      <dc:creator>BrianBaldwin1</dc:creator>
      <dc:date>2013-06-06T18:53:32Z</dc:date>
    </item>
    <item>
      <title>Re: Date from UserForm as input to SQL Query</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/date-from-userform-as-input-to-sql-query/m-p/634557#M17103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Looks like I just had to read in my old Getting to Know Arc Objects for 5 Seconds...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Just had to split the string where the date was and insert " &amp;amp; TimeStart &amp;amp; "&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jun 2013 19:04:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/date-from-userform-as-input-to-sql-query/m-p/634557#M17103</guid>
      <dc:creator>BrianBaldwin1</dc:creator>
      <dc:date>2013-06-06T19:04:07Z</dc:date>
    </item>
  </channel>
</rss>

