--- type: "fhirpath-function" title: "FHIRPath Function: convertsToDateTime" function: "convertsToDateTime" category: "Conversion" section: "5.5.5.2" source: "fhirpath/functions.json" --- # FHIRPath Function: convertsToDateTime _No canonical section match found in index.md._ ## Summary - **Category**: Conversion - **Section**: `5.5.5.2` - **Return Type**: `Boolean` - **Empty Input Result**: `empty` - **Errors on Multiple Input**: `true` ## Description If the input collection contains a single item, this function will return true if the item can be converted to a DateTime value. ## Arguments - `format` (optional): `String` - Optional format template for checking string convertibility (STU). Uses date/datetime format codes when provided instead of the default format. ## Type Mapping - `Any-Boolean` ## Example ```fhirpath '2022-01-01T12:00:00Z'.convertsToDateTime() // returns true 'invalid'.convertsToDateTime() // returns false ```