SORRY, i do tried some syntax like: data tst; set _tstdata; if prxmatch("/^P((\d+\.)?\d+[YMWD]$)?((\d+\.)?\d+Y$)?((\d+\.)?\d+M$)?((\d+\.)?\d+W$)?((\d+\.)?\d+D$)?(T((\d+\.)?\d+[HMS]$)((\d+\.)?\d+H$)?((\d+\.)?\d+M$)?((\d+\.)?\d+S$)?)?/", Duration) then Data_Type='durationDatetime'; run; even I add "and substrn(Duration, lengthn(Duration)) not in ('P', 'T')" at the if statement, but i still can't aviod the string of "P*" been recognized as the ISO 8601 DURATION FORMAT(WHICH IS WRONG) , is there any possibility that i can use only 1 patern to recognized the ISO 8601 duration?
... View more