Removing time from Birthdate

Clovertech Forums Read Only Archives Cloverleaf General Removing time from Birthdate

  • Creator
    Topic
  • #50819
    Yamil Velez
    Participant

      Hi  All

         I am looking at PID-3 and I am trying to find a way to only display the date without the time.  Is there a way to do this in an xlate?

      Thanks for your help in advance

      Yamil

    Viewing 5 reply threads
    • Author
      Replies
      • #67671
        Gary Atkinson
        Participant

          There is datecopy command u can use in xlate.

        • #67672
          Jim Kosloskey
          Participant

            Yamil,

            I believe you have two choices.

            You can change the field length in the outbound variant so that the field will become truncated after the COPY (I am not sure what happens if you use a PATHCOPY).

            That can be a problem if you are sharing the vatiant and other systems want the time. We don’t share variants here so that is not an issue.

            The other option is to us a Tcl proc to truncate the field.

            email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

          • #67673
            Yamil Velez
            Participant

              Thank you for the options I was able to figure it out

              Thanks

              Yamil

            • #67674

              You could use a tcl fragment to format that date as well.

              For testing …

              Code:

              set date “197206210901”
              regexp — {^(d{8})d{4}$} $date match dob

              Or in an xlate …

              Code:

              regexp — {^(d{8})d{4}$} [lindex $xlateInVals 0] match dob; set xlateOutVals [list $dob]

              -- Max Drown (Infor)

            • #67675
              Charlie Bursell
              Participant

                Gee Max that is overkill  ðŸ™‚

                Why not simply [string range $var 0 7]

              • #67676

                TMTOWTDI

                -- Max Drown (Infor)

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