Amending timestamp
Hi, I have a timestamp of 201906192359 with a HL7 and I need to add a minute to it to get 201906200000. Is there an easy way within Healthshare to do this?
It seems easy enough within SQL but I cannot get the SQL to work within Healthshare, this is what I have for SQL which does the job in SQL Server.
SELECT REPLACE(REPLACE(REPLACE(CONVERT(CHAR(16),DATEADD(mi,1,STUFF(STUFF(@test,11,0,':'),9,0,' ')),120),'-',''),' ',''),':','');
Within Healthshare I've tried to use this SQL to populate a :dateout variable using this code but it isn't updating :dateout. (datein: = 201906192359)
&sql(SELECT REPLACE(REPLACE(REPLACE(CONVERT(CHAR(16),DATEADD(mi,1,STUFF(STUFF(:datein,11,0,':'),9,0,' ')),120),'-',''),' ',''),':','')
INTO :dateout)
Thanks for your help.