Why doesn't MySQL upload my data properly?

Is it a good idea to use a long/string data type for dates in MySQL instead of using a "datetime" data type?

  • caching mechanism i use doesnt support date format, so i end up doing a lot of conversion(including time-zone and formatting). so am wondering if I can change it in DB too. Will there be any downside wrt storage/access time etc?

  • Answer:

    NO because, you can't perform so many date/time related operations on long/string for instance, comparing 2 dates, or get the day, month, year etc.

Aman Rai at Quora Visit the source

Was this solution helpful to you?

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.