Re: Coerce time
Re: Coerce time
- Subject: Re: Coerce time
- From: John Delacour <email@hidden>
- Date: Wed, 20 Aug 2003 22:33:45 +0100
At 1:21 pm -0700 20/8/03, Michelle Steiner wrote:
On Wednesday, August 20, 2003, at 12:42 PM, Rich Carroll wrote:
Is there a simple way to coerce "August 20, 2003" to 08/20/03?
Unfortunately, not.
Well it's not _that_ complicated ...
set _date to (current date)
set ls to words of "ja f mar ap ma jun j a s o n d"
set d to text -2 through -1 of ("0" & day of _date)
set m to "" & month of _date
repeat with i from 1 to 12
if m begins with item i of ls then
set m to text -2 through -1 of ("0" & i)
exit repeat
end if
end repeat
set y to text -2 through -1 of ("" & year of _date)
m & "/" & d & "/" & y
JD
.
_______________________________________________
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.