clock scan problem

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf clock scan problem

  • Creator
    Topic
  • #48760
    Jennifer Shepard
    Participant

      Hi Charlie (or whomever can help),

      Thanks for the code, but I’m getting this problem  ðŸ˜¯ :

      set dt 20060831120000

      regsub — {(d{8})(d+)} $dt {1 2} dt

      tcl>echo [clock format [clock scan $dt -format “%m/%d/%Y, %H%M Hours”]

      Error: bad switch “-format”: must be -base or -gmt

      Any ideas why I’m getting this error and you did not?

      Thanks

    Viewing 3 reply threads
    • Author
      Replies
      • #59589
        garry r fisher
        Participant

          Hi Jennifer,

          You are missing a close square bracket ].

          Regards

          G

        • #59590
          Jennifer Shepard
          Participant

            Nope, I tried that:

            set dt [clock format [clock scan $dt -format “%m/%d/%Y, %H%M Hours”]]

            Error: bad switch “-format”: must be -base or -gmt

            THanks!

            Jennifer

          • #59591
            Charlie Bursell
            Participant

              Try it this way

              set dt [clock format [clock scan $dt] -format “%m/%d/%Y, %H%M Hours”]

            • #59592
              Jennifer Shepard
              Participant

                So I guess at 10pm last night I missed it by one command! I left out the

                ‘format’ thinking ‘-format- took care of that. I had: set dt [clock [clock scan $dt] -format “%m/%d/%Y, %H%M Hours”].

                Thanks so much!

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