The only thing I know about using dates is how to use date() to get the time and date and parse it the way I want it. What I want, is to get like a timestamp of the date and time when the code is executed, put that into mySQL and take it out later so I can parse it how I want to at that given time.

Can anyone give me some directions? I don't know how to get the timestamp, exactly how I should store it in mySQL (theres a timestamp thing isn't there?), and how I use that stamp to generate that date.

    Dealing with dates and times can get very confusing. Mysql stores dates in the yyyymmdd format. Both PHP and Mysql each have their own ways of dealing with dates and times. Many, myself included, feel it is better to store dates/times as unix timestamps. use an int field in the database. Other's feel using mysql's format is the way to go. Its like vanilla vs chocolate - everybody has their favorite.

    you might look here for info on using php's date/time functions

    http://us4.php.net/manual/en/function.time.php

    Lite...

      Write a Reply...