Announcement

Collapse
No announcement yet.

Replacement Variable Time with Seconds

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Replacement Variable Time with Seconds

    Can anyone help me figure out how to get a variable for time with seconds? Basically I'm looking for the equivalent of $TIME but not truncated to minutes.
    Thanks

    #2
    Is this in HS Touch or where?

    Normally, you can use:

    $TIME=h:mm tt [this would give you 8:00 AM]
    $TIME=hh:mm tt [this would give you 08:00 AM
    $TIME=hh:mm:ss tt [this would give you 08:00:00 AM]
    $TIME=H:mm:ss [this would you give you military time in 24hr format with seconds]
    Transitioning to HS3Pro .298 - WinXPEmbedded

    Hometroller S3 Pro - WinXPEmbedded - HSP 2.5.0.81 - BLStat - HSPhone - HSTouch Srvr 1.0.0.73 - Touchpad - BLLan - BLOccupied - DSC Plug 2.0.0.14 - BLStat .38

    Comment


      #3
      Originally posted by Dafunktyfunk View Post
      Is this in HS Touch or where?

      Normally, you can use:

      $TIME=h:mm tt [this would give you 8:00 AM]
      $TIME=hh:mm tt [this would give you 08:00 AM
      $TIME=hh:mm:ss tt [this would give you 08:00:00 AM]
      $TIME=H:mm:ss [this would you give you military time in 24hr format with seconds]
      This is going in an email sent by HS2.
      If I use $TIME=hh:mm:ss tt as suggested above in the body of the sent email I get
      3:05 PM=hh:mm:ss tt
      as a result. I'd like to get
      3:05:45 PM
      but can't figure out how to do it.

      Comment


        #4
        Try using the []. IE - [$TIME=h:mm tt]
        Transitioning to HS3Pro .298 - WinXPEmbedded

        Hometroller S3 Pro - WinXPEmbedded - HSP 2.5.0.81 - BLStat - HSPhone - HSTouch Srvr 1.0.0.73 - Touchpad - BLLan - BLOccupied - DSC Plug 2.0.0.14 - BLStat .38

        Comment


          #5
          Originally posted by Dafunktyfunk View Post
          Try using the []. IE - [$TIME=h:mm tt]
          Unfortunately no luck.
          Just gives the brackets, fills in $TIME with hours and minutes and then give me the =h:mm tt.

          It seems weird to me that seconds appear in the log times but are not easily incorporated into HS for use.

          Comment


            #6
            Originally posted by jono View Post
            Can anyone help me figure out how to get a variable for time with seconds? Basically I'm looking for the equivalent of $TIME but not truncated to minutes.
            Thanks
            Still trying to solve this for emailing a replacement time variable with seconds for HS2. Advice much appreciated

            Comment


              #7
              Originally posted by jono View Post
              Still trying to solve this for emailing a replacement time variable with seconds for HS2. Advice much appreciated
              You can send an email via script, and use Dim dtTime As String = Format(DateTime.Now, "HH:mm:ss")
              Mike

              Comment


                #8
                Originally posted by mwaite View Post
                You can send an email via script, and use Dim dtTime As String = Format(DateTime.Now, "HH:mm:ss")

                Thanks for the reply Mike. That may be a little over my head. I have a bunch of other things that go in the email too and I'm just trying to time stamp them with send times (more accurate than receive times).

                Comment


                  #9
                  Did you ever get this sorted out?

                  I would like to know this answer as well....

                  Comment


                    #10
                    I did not. The scripting suggestions were over my head and I couldn't get it to work otherwise.

                    Comment


                      #11
                      Originally posted by jono View Post
                      I did not. The scripting suggestions were over my head and I couldn't get it to work otherwise.
                      Thanks for your answer.
                      Agreed, scripting is not something I can figure out on my own. I need a written sample, then I can usually modify it to fit my needs.

                      I will keep searching, if I figure it out, I will post back here.
                      For now, I am happy at least the $time and the $date work.

                      It would be nice to be a little bit more accurate though...

                      Comment

                      Working...
                      X