Hi Krishnaveni
There are 2 answers to this. The easy but wrong way , and the more correct way
The easy way would be to take the piece of the string before the space character, and then remove all nonNumeric chars
set output = $ZSTRIP($PIECE(input," ",1),"*AP")
The better was is to convert to the canonical date format, then convert back to the format you want. Relevant documentation page: https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cl…
set internaldate = $ZDATETIMEH(input,3) set outputdate = $ZDATE(internaldate,8)
- Log in to post comments
.png)