List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:March 13 2003 12:48pm
Subject:Re: Datetime vs Unixtime
View as plain text  
At 22:25 -0700 3/12/03, Jason Brothers wrote:
>Hello,
>
>I apologize if this topic has been discussed in the past.  I am just looking
>for feedback whether to use Datetime or Unixtime  (32 bit Int) for my
>timestamps.  From what I can tell here are the advantages and disavantages
>of each method:
>
>Unixtime (stored as 32bit int):
>advantages:
>- should require less CPU cycles to process
>- required only 4 bytes of storage.
>
>disadvantages:
>- a lot of 3rd party tools (interfacing thru ODBC) do not have native
>functions for Unixtime  (eg. Crystal Reports,  Excel).
>- Unixtime may confuse end-users.
>
>Datetime:
>advantages:
>- 3rd party tools have native functions for Datetime
>- Easier to understand for end-users
>
>disadvantages:
>- Likely cause more overhead to process  (for queries and inserts).
>- Requires 8 bytes of storage.
>
>At the moment I am on the fence and would appriciate any feedback or
>experience that anyone has.
>
>Cheers,
>Jason

Don't forget to consider the range of each type.  TIMESTAMP goes from
1970 to mid-2037.  DATETIME goes from year 1000 to year 9999.
Thread
Datetime vs UnixtimeJason Brothers13 Mar
  • Re: Datetime vs UnixtimePaul Chvostek13 Mar
  • Re: Datetime vs UnixtimePaul DuBois13 Mar
  • Re: Datetime vs UnixtimeKeith C. Ivey13 Mar
    • Re: Datetime vs UnixtimePaul DuBois13 Mar
    • Re: Datetime vs Unixtimewalt13 Mar
      • Re: Datetime vs UnixtimePaul DuBois13 Mar
    • Re: Datetime vs UnixtimeJason Brothers13 Mar
Re: Datetime vs UnixtimeKeith C. Ivey13 Mar
Re: Datetime vs UnixtimeJason Brothers13 Mar
  • Re: Datetime vs UnixtimeKeith C. Ivey13 Mar
    • Using LOAD DATA IN FILE or SOURCE with MyODBC.William Bailey25 Mar
  • Re: Datetime vs UnixtimePaul Chvostek13 Mar