Calculating time difference

Comments

3 comments

  • Alan

    Hi Baz,

    You'll want to use the ASDATE function to convert from string to date type.  You'll need to use a Parse Pattern to convert your string.

    Here's the full Datameer Functions reference page, so you can look up the various functions.

    Alan

    0
    Comment actions Permalink
  • Baz

    Thanks Alan. This is a time not a date but does the ASDATE function still apply here?  

    0
    Comment actions Permalink
  • Alan

    Hi Baz,

    Yes all dates are calculated from epoch time, in milliseconds and then displayed according to their parse pattern.

    If the data only includes a timestamp, and not the full date, you'll need to add a datestamp to it with a concatenation function first.

    This, of course, assumes the timestamps are all from the  same day.  Since without a full datestamp you can't tell if two timestamps are separated by multiple days.  12:00pm and 12:01pm can look like a 1 minute difference, but if the two timestamps occur on separate days, we're dealing with 24 hours and 1 minute now.

    Alan

    0
    Comment actions Permalink

Please sign in to leave a comment.