Use nicely formatted date(time) for profiles.

Includes refactoring inline code to a generally useful formatISODate()
function.