• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Fun with dates...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Fun with dates... (From: David Crowe <email@hidden>)

  • Prev by Date: Re: [ANN] XNet 1.0
  • Next by Date: one step (tell block) at a time in AS?
  • Previous by thread: Fun with dates...
  • Next by thread: Re: Fun with dates...
  • Index(es):
    • Date
    • Thread