Re: Fun with dates...
Re: Fun with dates...
- Subject: Re: Fun with dates...
- From: Paul Berkowitz <email@hidden>
- Date: Sat, 18 Jun 2005 12:54:00 -0700
- Thread-topic: Fun with dates...
Title: Re: Fun with dates...
On 6/18/05 8:16 AM, "David Crowe" <email@hidden> wrote:
Can anyone explain why the following statement generates an error ("Cannot make .... into a date"):
set ABSynchTime to "6/17/2005 23:56:45" as date
The same is true for:
set ABSynchTime to "6/17/2005 23:56:45"
set ABSynchTime to ABSynchTime as date
But, the following works:
set ABSynchTime to "6/17/2005 23:56:45"
set ABSynchTime to date ABSynchTime
Because a coercion to date from string using 'as' has never been implemented by AppleScript. What's to explain? These things don't happen by themselves, they have to be engineered. And this coercion has not been. So now you know, It would probably be a good idea if it were, but since you can just compile it the second way, putting 'date' before an appropriate string (or string variable) to compile it as a date object, it's no big deal. One you know.
--
Paul Berkowitz
_______________________________________________
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