Some are using a numeric equivalent for a date to optimize the indexing. It is known that using a date in a SQL command is not as optimized as using only integers for example. This is especially true if you use the date field twice such as greater than and less date values. What would be the proper technique to have an equivalent integer field to represent the date field so to use it in SQL commands?
I understand there is some kind of equivalent values which would also includes the hours, minutes, seconds and milliseconds.
Any techniques that are better than another one in this type of support?