tcl to strip milliseconds off time

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf tcl to strip milliseconds off time

  • Creator
    Topic
  • #51759
    Sandi Meyers
    Participant

      After much investigation i found the datecopyopt doesn’t always work.  Does anyone have a simple tcl proc they would be willing to share with me that would strip the mili seconds off a date/time field?

    Viewing 0 reply threads
    • Author
      Replies
      • #71650
        Russ Ross
        Participant

          With regards to datecopyopt not always working, I discovered issues with date/time percision when going from Cloverlef 5.2 to 5.6.

          In the older version of Cloverleaf percision is turned on by default and in the new version of cloverleaf it is turned off.

          That caused me to have to remediate my date/time procs to turn on percision to have the desired outcome like before.

          Your case might be fixable by simply modifing your HL7 variant to be short enough in length to truncate off the unwanted milliseconds, assuming it is the last 2 characters of the date/time field you want to send outbound.

          If that isn’t the case then please post a sample of the date/time string coming in and the desired date/time string going out.

          If you need a more surgical solution here is one of our XLT procs that grabs out the desired part of a string that might apply.

          It is call xlt_substring

          ################################################################################
          # Name:
          [code]################################################################################
          # Name:

          Russ Ross
          RussRoss318@gmail.com

      Viewing 0 reply threads
      • The forum ‘Cloverleaf’ is closed to new topics and replies.