OCLOperators strToDateTime
Created by Stephanie on 2025-01-09 · Last edited by Sandra.akech on 2026-02-19.
strToDateTime converts a string into a DateTime value using the CLR's system.convert.ToDateTime()
Syntax
strToDateTime() : DateTimeExamples
| Expression | Result |
|---|---|
| '2025-01-15T14:30:00'.strToDateTime() | 1/15/2025 2:30:00 PM |
| '2025-01-15'.strToDateTime() | 1/15/2025 12:00 AM |
| '01/15/2025 09:00'.strToDateTime() | 1/15/2025 9:00 AM |
| 'invalid'.strToDateTime() | error |
