Sorting by formatted date

Comments

3 comments

  • Avatar
    Chi Nguyen

    If sorting in descending order is not a priority, this will give you the same result sorted in ascending order in half the time-

    _sourceCategory=production/web/*
    | formatDate(_messagetime, "EEE") as day
    | where !(day="Sat" or day="Sun")
    | timeslice 24h
    | min(time_taken), pct(time_taken,25, 50), pct(time_taken, 99) as _pct_75, max(time_taken) by _timeslice

     

  • Avatar
    Diarmuid Wrenne

    Change your date format to be yyyy/mm/dd

  • Avatar
    Marc Powell

    I changed my date format to yyyy-mm-dd to fix the issue

Please sign in to leave a comment.