How do I add a class to a row based on the value of a field in that row?
The following will add the class 'hello' to the li tag. I used a view with machine name 'dates' and a display name of 'page'. The time field is the node created time. You can just install Devel and uncomment the dpm($vars) statement to get what you need. I also left the conditional logic up to you.

Put this in your theme's template.php file:

function MYTHEME_preprocess_views_view_list(&amp;$vars) {
  if ($vars['view']-&gt;name == 'dates' &amp;&amp; $vars['view']-&gt;current_display == "page") {
    // dpm($vars); //uncomment to see variables
    foreach($vars['view']-&gt;result as $key =&gt; $value){
      $timestamp = $value-&gt;node_created;
      if ($timestamp) { // add whatever conditional logic you need here
        $vars['classes_array'][$key] .= ' hello'; // note the space in front of class
      }
    }
  }
}


An alternative method is as follows:

Put this in your theme's template.php file:

function MYTHEME_preprocess_views_view_fields(&amp;$vars) {
  if ($vars['view']-&gt;name == 'dates' &amp;&amp; $vars['view']-&gt;current_display == "page") {
    $timestamp = $vars['row']-&gt;node_created;
    if ($timestamp &lt; strtotime('now')) {
      $vars['classes_array'][] = 'bye';
    }
  }
}


and use this views-view-fields--VIEWNAME.tpl.php file:

&lt;div class="&lt;?php print $classes;?&gt;"&gt;
&lt;?php foreach ($fields as $id =&gt; $field): ?&gt;
  &lt;?php if (!empty($field-&gt;separator)): ?&gt;
    &lt;?php print $field-&gt;separator; ?&gt;
  &lt;?php endif; ?&gt;

  &lt;?php print $field-&gt;wrapper_prefix; ?&gt;
  &lt;?php print $field-&gt;label_html; ?&gt;
  &lt;?php print $field-&gt;content; ?&gt;
  &lt;?php print $field-&gt;wrapper_suffix; ?&gt;
&lt;?php endforeach; ?&gt;
&lt;/div&gt;