which type of outputting are you using?
are you using html styles or php styles?
assuming you are using php styles echoing all the input, the soulution should like this
$datum= addslashes($datum);
echo '<input type="text" name="datum" value="$datum"> ';
since the echo funtion can make difference between single quote (') and double quote (")
when you are using html styles, the solution would be
$datum= addslashes($datum);
<input type="text" name="datum" value="<?=$datum?>">