explicit code using loop.
Sometimes explicit code is more memory and space efficient but not sure for
this simple case.

a=. 5 11$'May 04 2020May 01 2020Apr 30 2020Apr 29 2020Apr 28 2020'
t1=: 3 : 0
z=. ''
for_i. y do.
z=. z,<i
end.
)
  t1 a
+-----------+-----------+-----------+-----------+-----------+
|May 04 2020|May 01 2020|Apr 30 2020|Apr 29 2020|Apr 28 2020|
+-----------+-----------+-----------+-----------+-----------+



On Sun, May 17, 2020 at 1:56 PM HH PackRat <hhpack...@gmail.com> wrote:

> I need to convert the following list of 5 (in reality, far more)
> 11-character dates:
>
> May 04 2020
> May 01 2020
> Apr 30 2020
> Apr 29 2020
> Apr 28 2020
> $ --> 5 11
>
> to a list of 5 boxed dates:
>
> +-----------------+
> |May 04 2020|
> +-----------------+
> |May 01 2020|
> +-----------------+
> |Apr 30 2020|
> +----------------+
> |Apr 29 2020|
> +----------------+
> |Apr 28 2020|
> +----------------+
> $ --> 5
>
> (Sorry, my email limits me to a proportional font.)
>
> I've tried everything I can think of, with no luck.  I'm sure the
> answer will turn out to be rather easy.  The closest I've come in
> terms of boxing was boxing every character (which is NOT what I want):
>
> +------------------------+
> |M|a|y| |0|2| |2|0|2|0|
> +------------------------+
>      etc.
> $ --> 5 11
>
> Explicit code only, please!  Thanks!
>
> Harvey
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to