Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2005
    Posts
    63

    Unanswered: Date, DateTime, Time, Timestamp

    Hello,

    For storing date, date-time and time values, what data-type do you recommend? Is timestamp type a better approach for performance, ease-of-use and maintainability? Is timestamp better for a locale-specific i18n/i10n application? What happens after year 2037 that is the threshold for timestamp type?
    Last edited by screenmates; 06-02-06 at 16:35.

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    For storing date, date-time and time values, what data-type do you recommend?

    DATE, DATETIME, and TIME (respectively)


    Is timestamp type a better approach for performance, ease-of-use and maintainability?

    better than DATETIME? no

    but TIMESTAMP can be set to update automatically


    What happens after year 2037 that is the threshold for timestamp type?

    nothing

    perhaps you're thinking of the unix timestamp, but you need to store that type of value in an INTEGER

    TIMESTAMP is different
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Jul 2005
    Posts
    63
    Oops! I meant unix-timestamp as unsigned integer. Please clarify if unix-timestamp is a better approach than date/datetime types for an i18n/i10n application and for performance, ease-of-use and maintainability.

    TIA
    Last edited by screenmates; 06-02-06 at 21:58.

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by screenmates
    Please clarify if unix-timestamp is a better approach than date/datetime types for an i18n/i10n application and for performance, ease-of-use and maintainability.
    no, i don't think it is
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •