How can I programmatically insert date field values?
If your field's name is field_date you should access it by using 

$node-&gt;field_date['und'][0]['value'] = $datetime_value;


And if it has an "end" date you have to set its value2 property.

Try to install devel, create a node for the content type you want to use and go to the devel tab node/123/devel to explore its object.