16
cedricl
7y

That moment when your senior dev saves all dates in MySQL as a string human readable date

Comments
  • 1
    Oh boy! do I know about this... I've got a conversion chart on my wall just because this terrible godforsaken practice...
  • 1
    It really depends on the format. I always prefer human-readable dates in payloads because you can actually see what the dates are when debugging something without having to paste it into some converter.

    Now if you're saying they're storing dates in a VARCHAR column in the database, that's another story…
  • 3
    @devios1 I think he meant the later... I mean, who the fuck allows "(_)_)===D" to be stored on a field called "DateOfBirth", rite?
  • 0
    @Nelson LOL
  • 1
    You misspelled señor
  • 0
    I only use human readable with SQL Server and C# since they play nice together. As for MySQL, Sqlite no fucking way or good luck parsing that shit
  • 0
    when it's in iso 8601, I would be fine with it
  • 2
    Some people don't learn how to do shit right an no one tells them... I bet in some points any of us does stuff where the majority would facepalm.
  • 0
    aha! I have a similar story,

    One of the projects handled, uses the literal string 'True' and 'False' stored on a Varchar column. and sometimes 'true' lowercase.

    I'll strangle the dev when I found him, I swear. haha!
  • 1
    @silly-symphony Yup! seen that one too... Also 'T' and 'F' on VARCHAR(50) and Male on a BIT... I love working with databases btw =)
Add Comment