#1
  1. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Sep 2006
    Posts
    1,928
    Rep Power
    533

    Should database be used for date formatting


    Most will say that the database should not be used to format data, and instead format presentation should be left to the view/application.

    Does this concept also apply to formatting dates?

    Thanks
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Mar 2008
    Posts
    1,928
    Rep Power
    378
    It applies especially to dates. The end user should be able to view dates in the way that makes most sense to them. For me that's 'd-m-y'. For Americans it's 'm-d-y'.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Sep 2006
    Posts
    1,928
    Rep Power
    533
    Originally Posted by cafelatte
    It applies especially to dates. The end user should be able to view dates in the way that makes most sense to them. For me that's 'd-m-y'. For Americans it's 'm-d-y'.
    Thanks caelatte. Thought so, but I've been queries like DATE_FORMAT(myDateColumn,"%m/%d/%Y") for so long, I didn't trust my judgement.

IMN logo majestic logo threadwatch logo seochat tools logo