Re: AppleScript Date
Re: AppleScript Date
- Subject: Re: AppleScript Date
- From: Jon Pugh via AppleScript-Users <email@hidden>
- Date: Mon, 6 Jul 2020 11:56:58 -0700
On Jul 6, 2020, at 1:05 AM, Shane Stanley via AppleScript-Users
<email@hidden> wrote:
>
> On 6 Jul 2020, at 6:02 pm, john Mitchell via AppleScript-Users
> <email@hidden> wrote:
>>
>> What am I doing wrong?
>
> You need to pass a date, not a string.
It sounds flip, but it’s true. ;)
>> startDate has the value “10 July 2020" and I get this message
Try something like this:
set startDate to date "July 10, 2020”
which should compile into a longer literal, depending on your local date
formatting settings:
set startDate to date "Friday, July 10, 2020 at 12:00:00 AM”
You can then pass startDate to Calendar.
Jon
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden