title: How to select for an empty datetime in Dynamics AX 2009
body: <p>I have a table with a field name "StartDateTime" of type "DateTime". I want to do a query where those fields are null.</p>
  
  <p>In the table browser, I see these fields as "       00:00:00", where non-empty fields are like "2010-09-14 00:00:00".</p>
  
  <p>I tried using without success:</p>
  
  <pre><code>this.query().dataSourceTable(tableNum(smmActivities)).addRange(fieldNum(smmActivities,DataAreaId)).
                  value(strFmt('(%1!=%2)',
                  fieldStr(smmActivities, StartDateTime),
                  date2strxpp(datenull())));
  </code></pre>
  
  <hr>
  
  <p><code>date2strxpp(datenull())</code> returns 1900-01-01. So I presumes that's why it's not working. I thinkI need to find a date2strxpp that return '00:00:00' in a datetime format. Any suggestions?</p>