Re: Coerce date saved as text back to Applescript's date format?
Re: Coerce date saved as text back to Applescript's date format?
- Subject: Re: Coerce date saved as text back to Applescript's date format?
- From: Andrew Oliver <email@hidden>
- Date: Mon, 20 Dec 2004 11:54:48 -0800
On 12/20/04 11:47 AM, "Jake Pietrykowski" <email@hidden> wrote:
> How can I coerce the following text data:
>
> "Friday, December 16, 2004 11:24:05 AM"
>
> back into Applescript's date format?
Trick question!
You can't because there is no such date as "Friday December 16, 2004"
In 2004, December 16th was a Thursday.
That said, assuming you have a valid date string you can coerce it to a date
object by simply:
set theString to "Thursday December 16, 2004 11:24:05 AM"
set theDate to (date theString)
But the string has to be something AppleScript can reasonably coerce to a
date.
Andrew
:)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden