added datetime template func