OCLOperators strToDate
Created by Stephanie on 2025-01-09 · Last edited by Sandra.akech on 2026-02-19.
strToDate converts a string into a Date value using the CLR's system.convert.ToDateTime() method, then extracts the date portion.
Syntax
strToDate() : DateExamples
| Expression | Result |
|---|---|
| '2025-01-15'.strToDate() | 1/15/2025 |
| '01/15/2025'.strToDate() | 1/15/2025 |
| '2025-01-15 14:30:00'.strToDate() | 1/15/2025 |
| 'invalid'.strToDate() | error |
