Question
· Sep 11

Change Date Format from YYYYMMDDHHMMSS to YYYYMMDD in a DTL

Greetings,

Is it possible to change the date format from YYYYMMDDHHMMSS to YYYYMMDD in a DTL? How?

I tried ConvertDateTime() without success. 

I'm using Iris for Health

Thank you!

Product version: IRIS 2023.3
$ZV: 2023.1.3
Discussion (3)2
Log in or sign up to continue

$E is the shorthand version of $EXTRACT ...

ConvertDateTime(source.{PID:DateTimeOfBirth},"%Y%m%d%H%M%S","%Y%m%d") should work just fine.$E(source.{PID:DateTimeOfBirth},1,8) by itself should provide the same result.

But ConvertDateTime($e(source.{PID:DateTimeofBirth},1,8)) is basically taking the 8-digit date returned from $E() and converting it without any input and output patterns ... which gets you the exact same 8-digit date.