----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 15, 2000 12:36 AM
Subject: [REBOL] Computer date?


>
> Hi:
>
> I have been using REBOL's date format in file names. This has the
distinction
> of putting the files in a mixed order, and the dictionary does not show
other
> formats.
>
> Is there a way to get the date in yyyy-mm-dd format, without parsing the
basic
> date?
> --


Nothing that I can think of unless there something undocumented, but it
doesn't take too much to reformat

to-yyyymmdd: func [date [date!]][
   join date/year reduce

       either date/month < 9 [join "0" date/month][date/month]
       either date/day < 9 [join "0" date/day][date/day]
  ]
]

; usage..
to-yyyymmdd modified? %filename

or

to-yyymmdd now
=="20000215"

Cheers

Allen K

Reply via email to