I am connecting views to an external database and everything works fine if my views handler is a string but not as a date, here is my view definition:

$data['Punches']['Punch_Date'] = array(
   'title' => t('Punch Date'),
    'help' => t('Employees Punch Date'),
    'field' => array(
      'handler' => 'views_handler_field_date',
      'click sortable' => TRUE,
    'sort' => array(
      'handler' => 'views_handler_sort_date',
    'filter' => array(
      'handler' => 'views_handler_filter_date',
    'argument' => array(
      'handler' => 'views_handler_argument_date',

If I change views_handler_field_date to views_handler_field I can see the records in my view. The date coming from mysql looks like


I would also like to format that date to look like


The biggest problem is that I want to be able to filter between dates, thanks for any help that can be given.


To set the date format used when dates are displayed on your site, navigate to Home » Administration » Configuration » Regional and language, and set date format.

  • That's if the format is already coming over in the unix format. I decided to just send a unix timestamp to the database to circumvent this, but thanks for the reply. – Brian Sep 4 '13 at 19:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.