title: Comparison with NULL value and date in 4gl
body: <p>I have a value comming from database which is a date in informix.Sometimes this value will be null or else it will be a date.I am comparing that value with todays date like the following.</p>
  
  <pre><code>if(value_from_db &lt;= todays_date){
    //display Todays greater
  }
  else{
    //Display Todays smaller
  }
  </code></pre>
  
  <p>What will be the output here.It will print <code>Todays greater</code> or <code>Todays smaller</code>
  My question is that if <code>value_from_db is NULL</code> will it goes inside the if condition or inside the else condition.I found something in this which is described as</p>
  
  <blockquote>
    <p>A date field gets NULL value. If I use a FOR EACH even less or greather 
    than a
    user date this NULL field record appear. It seems to be NULL greather than 
    all
    other dates and at same time lees than all other dates.</p>
    
    <p>If the field which stores NULL value is an index component NULL values are 
    sorted high.</p>
  </blockquote>
  
  <p>I need to convert this into php but after analysing the correct o/p.In case of php </p>
  
  <pre><code>if(strtotime(NULL) &lt;= time())
    echo 'Todays greater';
  else
    echo 'Today is smaller';
  </code></pre>
  
  <p>This will ouput</p>
  
  <pre><code>Todays greater
  </code></pre>
  
  <p>I am confused.Any help is much appreciated.</p>