I vaguely knew about dates.ijs, and these were the hints
I was looking for to get me to dig in there.
I really like toTs as Raul suggested.
For the moment I am using the variant
toTS=: 0 ". e.&(~.":i.10)`(' '&,:)}
but want to check out Ric's
http://www.jsoftware.com/jwiki/RicSherlock/Temp/JulianDay
which looks like it has great explanation along with
working scripts.
Thank you all so much. These suggestions will make my
computations much more robust than what I could have been
satisfied with.
Best,
Cliff


Raul Miller wrote:
On 5/23/07, Cliff Reiter <[EMAIL PROTECTED]> wrote:
Are there standard J utilities for converting Date/time
text into a standard numeric form that accounts for
the complexities of dates?

Yes, but you'd also want something to convert your
timestamp strings to 6!:0 format:

  toTs=: 0 ". ' '"_`([:I.(~.":i.10)[EMAIL PROTECTED])`]}~
  require'dates'
  '2007-04-22T00:06:59Z' -&todayno&(3&{.)&toTs'2007-04-21T10:15:08Z'
1
  x:'2007-04-22T00:06:59Z' -&tsrep&toTs'2007-04-21T10:15:08Z'
49911000

The first number there is days, the second is milliseconds


--
Clifford A. Reiter
Mathematics Department, Lafayette College
Easton, PA 18042 USA,   610-330-5277
http://www.lafayette.edu/~reiterc

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to