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.  Date and Time-stamp Range - Help!!

    Employee
    Posted 12-15-2013 19:49

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

    Originally posted by: James M

    Hi,

    I'm trying to filter data based on date and time stamp ranges. I need to emit all results based on if the dates and times fall between

    MIN DATE: '2013-12-10'
    MIN TIME: '22:30:00'
    and
    MAX DATE: '2013-12-11'
    MAX TIME: '11:00:00'

    I've tried numerous things but nothing is giving back the results I desire.

    Thanks,
    James


  • 2.  RE: Date and Time-stamp Range - Help!!

    Employee
    Posted 12-15-2013 21:31

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

    Originally posted by: stonysmith

    The code below should work for you.. there are many choices available on how to format the data.


    StartTS = timeStamp(date(2013,12,10),time(22,30,0))
    EndTS = timeStamp(date(2013,12,11),time(22,30,0))

    TestData = timeStamp(mydatadate,mydatatime)

    emit *
    where StartTS <= TestData and TestData <= EndTS


  • 3.  RE: Date and Time-stamp Range - Help!!

    Employee
    Posted 12-15-2013 22:38

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

    Originally posted by: James M

    That worked a treat, thank you very much!!