• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: getting the date
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getting the date


  • Subject: Re: getting the date
  • From: Michelle Steiner <email@hidden>
  • Date: Tue, 30 Dec 2003 09:17:17 -0700

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>)

  • Prev by Date: getting the date
  • Next by Date: Re: getting the date
  • Previous by thread: getting the date
  • Next by thread: Re: getting the date
  • Index(es):
    • Date
    • Thread