Welcome Guest, Not a member yet? Register   Sign In
Dates mysql dates or Integers
#1

[eluser]edhrx[/eluser]
Just starting the db design for fairly complex membership system that has loads of date fields in.

I just interested in views as to the advantages / disadvantages of saving the dates as integers instead of the date format

best wishes..ed
#2

[eluser]GSV Sleeper Service[/eluser]
advantages
less confusion over mm/dd/yyyy or dd/mm/yyyy etc

disadvantages
can't tell what the date is at a glance (raw db dump)
possible 2038 problem if you're not careful

personally I use mysql date or datetime types.
#3

[eluser]Sean Murphy[/eluser]
Using a unix timestamp stored as an integer can give you much better performance, but like GSV Sleeper Service said, you can run into date boundary problems.




Theme © iAndrew 2016 - Forum software by © MyBB