How to set a datetime field = now() during insert?
Using a slightly different syntax (drupal_write_record):

$new_record = array(
    'field' =&gt; $form_state['values']['field'],
    'timestamp' =&gt; date("Y-m-d H:i:s", time()), //&lt;- this
);          
drupal_write_record('table_name', $new_record);