• Iulian -207023 (10/21/2010)


    What about storing data as int like this yyyymmdd? (year*10000 + month*100 + day)

    There is a perfectly good datatype that is optimized for working with datetime data. It accommodates internationalization, it handles date arithmetic, and it handles leap years. Storing it as an int doesn't achieve any of these and converting back and forth costs cycles.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA