End Code Function Python Format Datetime As String