LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  Time format

    Employee
    Posted 09-16-2014 23:26

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: cristi.boizas

    Hello guys,

    I am trying to read a string which represents time from a file and store it for further processing in the LAE graph as a time datatype. The problem is that the string contains also the milliseconds of the time so I am asking you: Is there any way I can transform the internal time format stored in the graph from HH:MM:SS to HH:MM:SS.ss ?


  • 2.  RE: Time format

    Employee
    Posted 09-17-2014 07:25

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: ltolleson

    Hi Cristi,

    It can be done, but the functionality is not as straightforward as you are thinking. You will need to use the datetime type instead of just the time type field and then adjust the datetime with the milliseconds. See Example Below.

    EXAMPLE

    someDate = date()
    someTime = time()
    MS = 123

    someDT = timestamp(someDate, someTime)

    someDTMS = someDT.dateTimeAdjust(MS, "milliseconds")

    emit someDate, someTime, someDT, someDTMS