Summary

This article covers a script example for converting dates.

Table of Contents


Description

This script is written to convert dates within the import file to the date format that is used in the casebook of the study. The reasons for having to create this conversion are varied, but most often it is because the lab cannot change their date format or the format of the casebook dates change after the lab format has been specified. In this case, column 16 of the delimited text file contains a date in hyphen separated format and the casebook of the clinical trial is expecting a slash separated format. So we take the input, which is always a string and force it to a specific date format using the commands below.

Script

<script scriptId="convertCollectionDt">
    <body>
        <s:toString>
            <s:toDate>
                <s:import inputPath="16"/>
                <s:string value="dd-MMM-yyyy"/>
            </s:toDate>
            <s:string value="dd/MMM/yyyy"/>
        </s:toString>
    </body>
</script>






Need more help?

Please visit the Fountayn Contact Information page.