Examples of outputting a formatted date
Current date formatted as MM/dd/yyyy: new Date().format('MM/dd/yyyy')
Current date formatted as M/d/yyyy: new Date().format('M/d/yyyy')
Date of a variable formatted as MM/dd/yyyy: new Date(#EncounterDate).format('MM/dd/yyyy')
Date of a variable formatted as M/d/yyyy: new Date(#EncounterDate).format('M/d/yyyy')