KX Community

Find answers, ask questions, and connect with our KX Community around the world.
KX Community Guidelines

Home Forums kdb+ xbar millisecond Re: xbar millisecond

  • rocuinneagain

    Member
    September 9, 2022 at 12:00 am

    A timespan can be used directly

    q)select avg col by 0D00:00:00.005 xbar time from t 
    time                         | col 
    -----------------------------| ---- 
    2022.09.09D07:40:23.110000000| 3 
    2022.09.09D07:40:23.115000000| 11.5 
    2022.09.09D07:40:23.120000000| 18