simle but confused question

Hi?
  This question like,

select from (d:-10+til 356;pdate:2018.01.01+til 356) where pdate=“D”$“2018.12.19”  / work

select from (d:-10+til 356;pdate:2018.01.01+til 356) where pdate=“D”$“2018”,“.12.19” / not work

why?

“,” is interpreted differently in the context of where constraints, try this

q)select from ([]d:-10+til 356;pdate:2018.01.01+til 356) where pdate="D"$("2018",".12.19")d pdate--------------342 2018.12.19

Careful with , in selects ;) they mean something different there and it takes precedence. Put expressions in ()