18

I'm working with DATES today. Who puts a date in the db as a STRING!

Comments
  • 1
    Oh that is bad.
  • 1
    INTriguing question, unsigned from knowledge that one is
  • 1
    almost all my classmates 😂
  • 0
    Bad idea.
  • 0
    I've seen worse... I've seen them as doubles :-)
  • 0
    Save it as Datetime, preferbly utc
  • 2
    You can change the data type of the column and problem solved... Unless they exist invalid date values.. Then you will need to create a script to handle them and correct them.

    I've done this quite a lot with big data sets without proper data types or consistency in their data, it could be quite annoying, but once solved, it's worth it! Good luck :)
  • 1
    I'm not convinced yet whether a string is worse or .. not worse than individual INT columns for day, month, year, hour, second, etc..
Add Comment