How do I create table with date/time stamps?

Hi all,I am really a newbie and Q is such counter-intuitive. I really needyour help.How do I create a table with the following columns:DateTime TradePrice TradeVolume---------------The datetime stamps can be in format such as the following:Jan - 02- 2010 9:30:00or20100102 9:30:00,etc.(In Matlab I can create any such date/time strings. The goal is tostore the data into Q/KDB from Matlab.)--------------------How do I create such three column table in Q/KDB?And then how do I aggregate the table according to date/timestamps?For example, I would like to compute the weighted average prices in 2-second interval in the above table.And also like to compute the min and max prices in 2-second intervalin the above table.And then would like to query out the above results (min, max, avg)from 9:30:00 to 10:00:00, 10:00:00-10:30:00, etc. for each day… anddo work on top of these min, max, avg prices in the 30-minintervals… (iteratively run on each of them…)How to do this query?Thanks a lot for your help!

I suggest starting with the excellent tutorial / book available at:https://code.kx.com/trac/wiki/QforMortals2/contentsuser/pass: anonymous/anonymousOn 11 Juni, 04:32, LunaMoon <lunamoonm…> wrote:> Hi all,>> I am really a newbie and Q is such counter-intuitive. I really need> your help.>> How do I create a table with the following columns:>> DateTime ? TradePrice ?TradeVolume>> --------------->> The datetime stamps can be in format such as the following:>> Jan - 02- 2010 9:30:00>> or>> 20100102 9:30:00,>> etc.>> (In Matlab I can create any such date/time strings. The goal is to> store the data into Q/KDB from Matlab.)>> -------------------->> How do I create such three column table in Q/KDB?>> And then how do I aggregate the table according to date/timestamps?>> For example, I would like to compute the weighted average prices in 2-> second interval in the above table.>> And also like to compute the min and max prices in 2-second interval> in the above table.>> And then would like to query out the above results (min, max, avg)> from 9:30:00 to 10:00:00, 10:00:00-10:30:00, etc. for each day… and> do work on top of these min, max, avg prices in the 30-min> intervals… (iteratively run on each of them…)>> How to do this query?>> Thanks a lot for your help!</lunamoonm…>