data types of literals

How do I add a data type to a Literal? Without it, the only comparisons I'll be able to make are string comparisons. I could assume in the case of math operators that it should be a number, but what if there is no math operator? What if it's a date?