Template functions - added DateFormat function.