Use variable in body raw text not like json

How to use variable in body RAW text ?

Hi community,

I have defined a variable in the pre-request script of my collection called “DateNow” like that :

var DateNow = new Date().toISOString().replace(/(.\d{3})|[^\d]/g,‘’);
postman.setEnvironmentVariable(‘DateNow’, DateNow);

Now i must pass this variable in the body raw text of my HL7 message like that :

MSH|^~&|Soft1||Soft2||{{DateNow}}||SIU^S12^SIU_S12|1dc8ed8b21d8502f2199|P|2.5.1|||||FRA|UTF-8

but the {{DateNow}} still remain text and not variable.

How can i do it ?

Best regards,

Jouvence