Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getting the date



On Dec 30, 2003, at 8:37 AM, Simon Kidd wrote:

Iam trying to make a folder with the current date, Ive found that:

set days_date to current date

gives me the date and time in this format "date "Tuesday, 30 December, 2003 10.34.27am""

is there a way of getting the date like so: "031230"

set days_date to (current date)
set short_date to short date string of days_date
set text item delimiters to "/"
set date_list to text items of short_date
set text item delimiters to ""
--the following assumes that the system is using US date format (m/d/yy)
--and that you want yymmdd
repeat with i from 1 to 2
set item i of date_list to text -2 through -1 of ("0" & (item i of date_list))
end repeat
set days_date to item 3 of date_list & item 1 of date_list & item 2 of date_list

--
We're not human beings having a spiritual experience.
We're spiritual beings having a human experience.
_______________________________________________
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.

References: 
 >getting the date (From: Simon Kidd <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.