Add IMMUTABLE marker to makedate, and add separate pure-SQL version