If you are looking for code to format dates and/or times *now* then the
'format/datefmt' and 'types/datetime' addons both have functionality that
might be useful to you.

   load 'types/datetime'
   'DDDD, D MMM, YYYY' fmtDate toDayNo 6!:0''

Tuesday, 23 Jan, 2018



Cheers,

On Tue, Jan 23, 2018 at 4:02 PM, Ian Clark <[email protected]> wrote:

> (6!:0 NIL) returns the current date/time as an integer 6-list timestamp.
>
> (6!:0 'hh:mm:ss MM/DD/YY') ditto, but in the specified format (y).
>
> How can I use the *selfsame* algorithm to format any (valid) timestamp?
>
> If the answer is "only by writing my own formatting verb, or by setting the
> system clock", might there be a case for extending (6!:0) to take an
> optional (x)? Not just an integer 6-list timestamp as described, but a few
> other forms, like (_1) meaning yesterday.
> ----------------------------------------------------------------------
> 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