How to check if there was a date input?

How to check if there was a date input?

Hi,
 
at  add|success  I tried to check if there was date input in the form, if not ---- the record in the database has to be filled up with the current date.
 
 
if (input.date == "")
 {
   input.date = zoho.currentdate;
 }
 
... is not working because:
 
The Left expression is of type TIMESTAMP and the right expression is of type STRING and the operator == is not valid here
 
Anybody know a solution? I have got no time today to check by myself ;-)
 
Thanks in advance,
 
Paul.