KX Community

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

Home Forums kdb+ Accessing the last element of List of List Re: Accessing the last element of List of List

  • soheir

    Member
    December 8, 2021 at 12:00 am

    Hey @ekallivrousis – is this what you’re trying to do?

    q)x:(`Col1;12;.z.Z)
    q)y:(x;x;x)
    
    `Col1 12 2021.12.08T17:33:36.400
    `Col1 12 2021.12.08T17:33:36.400
    `Col1 12 2021.12.08T17:33:36.400
    q)y,'gtime .z.P
    
    `Col1 12 2021.12.08T17:33:36.400 2021.12.08D17:33:47.617397000
    `Col1 12 2021.12.08T17:33:36.400 2021.12.08D17:33:47.617397000
    `Col1 12 2021.12.08T17:33:36.400 2021.12.08D17:33:47.617397000

    Or are you looking to use the last item of each list of y (list of lists) as an input to gtime ?