Let’s see how to convert a date from yyyy-mm-dd hh:mm:ss to yyyymmddhhmmss. This can be useful when you’ll use sort functions for example (such as asort()).

Elegant:

Obvious:

Insane: