epoch vs date() or time()

Discussion in 'Databases' started by alphamonk, Apr 27, 2010.

  1. #1
    I have only seen and used date and time columns in databases. I am starting a new project and I feel using epoch will be the best solution for this project. Is there anything that i am overlooking why epoch is not normally used?
     
    alphamonk, Apr 27, 2010 IP
  2. carfanatic01

    carfanatic01 Peon

    Messages:
    239
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Well, maybe there's a problem with the procedure.. Or there might be installation problems.. Try reinstalling..
     
    carfanatic01, Apr 27, 2010 IP
  3. alphamonk

    alphamonk Peon

    Messages:
    116
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    My question must be unclear. I will try to ask the question better this time.

    I am using a mysql database. I would normally use a date timestamp that looks like this "2010-04-27".
    I am going to do a lot of queries based on time greater than or less than the current time.
    I want to use epoch which looks like this "1272406314".

    I do realize that using the standard date time I can have mysql do all the date comparison for me.
    If I use epoch I will most likely have to setup conditions to preform the date comparison.

    I wanted to know why folks prefer the normal date times tamp to using epoch time stamp.
    There is nothing wrong with anything I doing some prep work before coding.

    I hope this makes sense.
     
    alphamonk, Apr 27, 2010 IP