Edit Help!
Jay R. Ashworth
jra at baylink.com
Sun May 16 12:44:26 PDT 2004
On Sun, May 16, 2004 at 09:40:46AM -0400, Kenneth Brody wrote:
> Quoting "Jay R. Ashworth" <jra at baylink.com>:
> > On Fri, May 14, 2004 at 12:00:54PM -0400, Tim Fischer wrote:
> [...]
> > > Basically, I need to make an mdy/ format into yyyy-mm-dd.
> >
> > You aren't quite clear; do you just need the reverse order and the 4
> > digit year, or do you *explicitly* need dashes as the delimiters?
> >
> > If the former, just assign it into an MMDY/ type dummy.
>
> ITYM "YYMD/".
Of course, d'oh.
> > If you need the dashes, too, you'll have to do a second assignment,
> > into something that changes slashes into dashes, like
> >
> > [ { ! "/" ! < "-" > close-curly close-square
> >
> > (broken keyboard)
> >
> > Did I get that right, Ken?
>
> That would convert slashes to dashes, but wouldn't allow any other
> characters.
Which is the mistake I always make when writing edits from scrathc.
> My first solution would be to do it in one step with processing:
>
> xx = xlate(doedit(mdy_field,"YYMD/","10"),"/","-")
Well, actually, it was your second solution, if I didn't misread the
datestamps, but... it's nice nonetheless. And, of course, at that
stage, xx could be YYMD/,10 so you could still do date math with it.
Cheers,
-- jra
--
Jay R. Ashworth jra at baylink.com
Member of the Technical Staff Baylink RFC 2100
The Suncoast Freenet The Things I Think
Tampa Bay, Florida http://baylink.pitas.com +1 727 647 1274
"They had engineers in my day, too." -- Perry Vance Nelson
More information about the Filepro-list
mailing list