Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Timestamp
How are you going to implement sorting in database by date with strings? -
Panni1417y@rostopira afaik (at least) MySQL allows sorting by dates if you use DATE(TIME) as the datatype and format the values accordingly (YYYY-MM-DD HH:MM:SS)
-
YYYY-MM-DD but the big question is why the fuck has js no fucking proper function to format dates with whatever format I want. Every other language has got that covered by default. But noooo you have to include moment.js or datetime.js to get It... I hate js sometimes.
-
antic16387yThe One True Date Format (TOTDF): YYYY-MM-DD
Shows up properly in a directory listing. -
Root825997yYYYY-MM-DD because sorting and because it avoids the America/Europe ordering confusion.
Related Rants
Which date format do you use?
- Timestamp
- YYYY-MM-DD
- DD.MM.YYYY
- Something else?
question
timezone
timezones
date
time format
date format
time
times
dates