Re: Another question on dates and times
Re: Another question on dates and times
- Subject: Re: Another question on dates and times
- From: Clint Hoxie <email@hidden>
- Date: Tue, 4 Dec 2007 20:55:12 -0700
Thanks a bunch. It was the "date string" piece that I knew must be out
there, but I still don't know where to find things like that. I don't
see them in the libraries, unless I'm just missing something.
Clint
On Dec 4, 2007, at 8:32 PM, Brian Johnson wrote:
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