Declare the variable as date and not as integer or long.