Re: Another question on dates and times
Re: Another question on dates and times
- Subject: Re: Another question on dates and times
- From: Brian Johnson <email@hidden>
- Date: Tue, 4 Dec 2007 19:32:54 -0800 (PST)
Clint,
All you need to do is add 24 hours to the current date, like this:
--Set variable for default to current date plus one day
set TomorrowDate to date string of ((current date) + 24 * hours)
display dialog "Enter event date:" default answer TomorrowDate
The "current date" info is maintained as a date, to which you add 24
hours. The resultant date can then be consulted to extract the "date
string". Try it with 28*24*hours and you'll get a date in 2008, as you
should...
-brian johnson, dept of architecture, university of washington, seattle
On Tue, 4 Dec 2007, Clint Hoxie wrote:
Please tell me what resource I can use to figure this stuff out. I just flat
don't know where to look, beyond the descriptions in the libraries.
Anyway, I am getting an error which looks to be telling me that a date can't
be returned as a string.
Here is the code.
--Set variable for default to current date plus one day
set TomorrowDate to (month of (current date)) + 60 * 60 * 24 & "/" & (day of
(current date)) + 60 * 60 * 24 & "/" & (year of (current date)) + 60 * 60 *
24\
display dialog "Enter event date:" default answer TomorrowDate
I also tried it with setting to just current date + etc., but same result.
Clint
PS - Thanks for any help.
_______________________________________________
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