time + date = datetime

Hi all,i tried to add time to date, but it fails.What is the most efficient way to do it correctly? I believe that ineed to cast it, but to what type ?String, int,float, symbol are all not working.d:2011.08.12;m:09:00:00;d+m is not working.Thanks for any help.Kim

datetime format has a T between date and time try doing this

2011.08.12T09:00:00

To: personal-kdbplus@googlegroups.com
X-Mailer: Apple Mail (2.1084)

works for me. paste your error

$ q
KDB+ 2.6 2011.02.04 Copyright (C) 1993-2011 Kx Systems
l64/

q)d:2011.08.12
q)m:09:00:00
q)d+m
2011.08.12T09:00:00.000

Hello,This works for me in the version I’m using. Not that m is of typesecond (“v”) & not time (“t”). Perhaps this may be causing the issuein the version you’re using.q)d:2011.08.12q)m:09:00:00q)d+m2011.08.12T09:00:00.000q).z.k2011.03.07q).z.K2.7Regards,Fintan.On Apr 1, 11:55?am, kuentang <kuent…> wrote:> Hi all,>> i tried to add ?time to date, but it fails.>> What is the most efficient way to do it correctly? I believe that i> need to cast it, but to what type ?>> String, int,float, symbol are all not working.>> d:2011.08.12;> m:09:00:00;>> d+m is not working.>> Thanks for any help.>> Kim</kuent…>

Hello,This works for me in the version I’m using. Not that m is of typesecond (“v”) & not time (“t”). Perhaps this may be causing the issuein the version you’re using.q)d:2011.08.12q)m:09:00:00q)d+m2011.08.12T09:00:00.000q).z.k2011.03.07q).z.K2.7Regards,Fintan.On Apr 1, 11:55?am, kuentang <kuent…> wrote:> Hi all,>> i tried to add ?time to date, but it fails.>> What is the most efficient way to do it correctly? I believe that i> need to cast it, but to what type ?>> String, int,float, symbol are all not working.>> d:2011.08.12;> m:09:00:00;>> d+m is not working.>> Thanks for any help.>> Kim</kuent…>

Thanks for all the reply so far.This is roughly the Code that creates the Error{select d +m from x} select by d,1 xbar t.minute from ( t:.z.t+til10; d:.z.d+Til 10)and it Works on my Personal machine but Not on that from the work.I believed As indicated by finqtang this is a Minute and Date issue.Thanks for all the commentsOn 1 Apr., 18:20, fintanq <fint…> wrote:> Hello,>> This works for me in the version I’m using. Not that m is of type> second (“v”) & not time (“t”). Perhaps this may be causing the issue> in the version you’re using.>> q)d:2011.08.12> q)m:09:00:00> q)d+m> 2011.08.12T09:00:00.000> q).z.k> 2011.03.07> q).z.K> 2.7>> Regards,>> Fintan.>> On Apr 1, 11:55?am, kuentang <kuent…> wrote:>>>> > Hi all,>> > i tried to add ?time to date, but it fails.>> > What is the most efficient way to do it correctly? I believe that i> > need to cast it, but to what type ?>> > String, int,float, symbol are all not working.>> > d:2011.08.12;> > m:09:00:00;>> > d+m is not working.>> > Thanks for any help.>> > Kim</kuent…></fint…>