---Hahn, Harvey wrote: > But when I try this, I get this (x is the date row in the boxed array): > > xx =: x NB. to "play it safe" with "x" and "y" > x2 =: 1&todayno &.> xx > |domain error: todayno > | a=.0 100 100 #:a > > What's my problem? Thanks!
todayno is expecting numeric y and I think you are giving it literals. You need to convert your dates to numeric before giving them to todayno. ]tst=. <;._1 '|20080102|20080104|20080106' +--------+--------+--------+ |20080102|20080104|20080106| +--------+--------+--------+ 1 todayno each tst |domain error: todayno | a=.0 100 100 #:a ]tst=. _99&". each tst +--------+--------+--------+ |20080102|20080104|20080106| +--------+--------+--------+ 1 todayno each tst +-----+-----+-----+ |75971|75973|75975| +-----+-----+-----+ ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
