RE: Date coersion
RE: Date coersion
- Subject: RE: Date coersion
- From: email@hidden
- Date: Thu, 11 Jul 2002 00:10:31 EDT
Paul,
Date is a kind of odd fish in the sense that it is a descreet data
structure of it's own, not of any other type. The first step that I would
recommend is creating a new date variable that you can then go back and
change, i.e. :
set Now to the current date
Having done that, you can poke at the various values contained within Now:
set the year of Now to 1971
set the month of Now to September
set the day of Now to 17
hope the points you in the right direction for what you're trying to do. I
can send you a more detailed example from a script I have (offlist) if you
desire it.
Best Wishes
=-= Marc Glasgow
Paul wrote:
>
I want to take a date string from a text field and convert
>
it into a date.
>
>
The first line accepts the string into nDate set the nDate
>
to contents of text field "toDate" as string
>
>
The help says to coerse the string to a date as follows set
>
cDate to date nDate
>
>
But when run I get Apple script error
>
NSReceiverEvaluationScriptError: 3 (1)
>
>
What's wrong?
>
>
I am new to Applescript but hey you have to start sometime!
>
>
Thanks Paul Garfield
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.