On 5/21/03 1:03 PM, "Eric Schult" <[log in to unmask]> wrote:

> on 5/21/03 1:37 PM, Mark Munro wrote:
>
>> How about using unix to do that?
>>
>> do shell script "date '+%m.%d.%y'"
>
> I'm trying to coerce a string ("05212003") into a date (date "Wednesday, May
> 21, 2003 12:00:00 AM"). Can that be done with a variation of the syntax
> above?

If you're always going to use that exact format and have your own short date
settings in month/day/year order then this will work:

set theDate to "05212003"

set theDate to (text 1 thru 2 of theDate) & "/" & (text 3 thru 4 of theDate)
& "/" & text 5 thru -1 of theDate

set theDate to date theDate


But other people in the world will have it completely differently. That can
be arranged...
--
Paul Berkowitz