Welcome Guest, Not a member yet? Register   Sign In
Best way to store the time and date
#21

[eluser]edjon2000[/eluser]
[quote author="umefarooq" date="1294913646"]in my point of view best way to save date and time in mysql, table column data type should be datetime or only date if you are saving only date, while your are retrieving data from table and you want date in specific format then use date_format mysql function date in any format its really fast and easy way check out doc about date_format

http://dev.mysql.com/doc/refman/5.5/en/d...ate-format[/quote]

Hi umefarooq,

Yeah, however for some reason I have never quite got that to work reliably, I will try again and look at that article you linked to, I need to add another date field to my database for this project anyway so as I can have a date_posted field, and a separate date_last_updated field so using a single format would make more sense, especially, if syncing problems were to sneak in between the unix and the equivalent mysql versions of the dates as mentioned above by c77m




Theme © iAndrew 2016 - Forum software by © MyBB