go to post Muni Ganesh · Nov 6, 2020 Hi Brian, Could you please with below code. ---------------------------------------------------- Class Sample.TempUtil Extends %RegisteredObject{ ClassMethod GetSecondUpperCase(pInput As %String) As %String{ ;w ##class(Sample.TempUtil).GetSecondUpperCase("GetSecondUpperCase") SET stsrtpos=$LOCATE(pInput,"[[:upper:]]{1}",2) SET endpos=$LOCATE(pInput,"[[:upper:]]{1}",(stsrtpos+1)) SET result=$EXTRACT(pInput,stsrtpos,(endpos-1)) quit result} }---------------------------------------------------------------- Regards, Muni Ganesh
go to post Muni Ganesh · Jun 22, 2020 Hi Ewan, Slightly I have modified you query, its working fine. &sql(SELECT REPLACE(REPLACE(REPLACE(CONVERT(CHAR(16),DATEADD(mi,1,STUFF(STUFF(STUFF(STUFF(201906192359,11,0,':'),9,0,' '),5,0,'-'),8,0,'-')),120),'-',''),' ',''),':','') into :OutVal)