datetime in format - yyyymmddhhmmss
I receive dateTime in this format - yyyy-mm-ddThh:mm:ss+01:00
for ex : 2024-05-31T17:33:08+01:00
I wanted it to convert to yyyymmddhhmmss
desired output = 20240531173308
Discussion (3)0
Comments
If you just want a very basic conversion (i.e. not converting to a canonical date type first), then this will work
set dt = "2024-05-31T17:33:08+01:00" set formatteddt=$ZSTRIP($PIECE(dt,"+",1),"*WPA") write formatteddt 20240531173308
Many Thanks , its working
Another way
WRITE$ZSTRIP($ZDATETIME($HOROLOG, 8), "*P")