Storing dates in the database
8 members have voted
-
Recently Browsing 0 members
- No registered users viewing this page.
-
Similar Content
-
- 0 replies
- 5 views
-
- 8 replies
- 1,906 views
-
Save 96% off a lifetime plan to iBrave Cloud Web Hosting — or alternative deal
By News Staff,
- ibrave
- web hosting
- (and 9 more)
- 0 replies
- 3 views
-
Save 96% off a lifetime subscription to iBrave Cloud Web Hosting + $20 Store Credit
By News Staff,
- ibrave
- neowin deals
- (and 9 more)
- 0 replies
- 4 views
-
Get this Complete 2021 SQL Master Class Bundle for only $19.99
By News Staff,
- neowin deals
- sql
- (and 6 more)
- 0 replies
- 5 views
-
Question
ncc50446
Hey,
So I'm working on this project, and was trying to figure something out.
How should I store the dates in the database (MySQL).
Now, normally, I just used time() (Seconds since 1970). I do it for all dates. Dates when people registers, blog post dates, anything like that. I like working with them. I find it easy.
But, what is more recommended. I tried Google, but seems that it doesn't matter if you use the date, or unix_timestamp. But I thought I would see what the people of Neowin think.
Link to comment
Share on other sites
8 answers to this question
Recommended Posts