hook_views_pre_render and hook_node_view In my custom module I'm creating a logic with two fields. 

The first field is an image and the second is date field.
When I choose past date from the date field, the image field should be hidden. If the date value is present or made in future, the image will be visible.

It's working great on hook_node_view, but I can't figure out how to do this on views.

Here's my code:

&lt;?php
function custom_alter_node_view($node, $view_mode, $langcode) {
 if ($node-&gt;type == 'hot_offers') {
    $c = strtotime($node-&gt;field_hot_offers_new_date['und'][0]['value']);
    $current_time = date("m/d/Y H:i:s");
    $d = strtotime($current_time);
    if ($c &lt; $d) {
    $node-&gt;content['field_hot_offers_new_image']['#access'] = FALSE;
    }
  }
}


I know there's a hook_views_pre_render, but how do I create the same logic, so the image will be visible only if the date field value will be present or in future?
I've solved the puzzle and I'm sharing the solution.

function custom_alter_views_pre_render(&amp;$view) { 
    if ($view-&gt;name == 'hot_offers') {
        //dpm($view);
foreach ($view-&gt;result as $key=&gt;$value) {
    $c = @$value-&gt;field_field_hot_offers_new_date[0]['raw']['value'];
    $d = date("Y-m-d"); //2014-06-26
    if ($c &lt; $d) {
    $value-&gt;field_field_hot_offers_new_image[0]['rendered']['#access'] = FALSE;
    }
  }
 }
}


The tricky part was to set the $d same format as the new_date field, otherwise the if statement logic will not work.