• 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: Nigel Garvey <email@hidden>
  • Date: Tue, 30 Dec 2003 21:32:59 +0000

Simon Kidd wrote on Tue, 30 Dec 2003 10:37:04 -0500:

>Hi,
>
>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"

Here we go again:

set theDate to (current date)
set {year:y, day:d} to theDate
copy theDate to b
set b's month to January

text 3 thru 8 of ((y * 10000 + (b - 2500000 - theDate) div -2500000 *
100 + d) as string)

... or 'as Unicode text', if you prefer.

NG
_______________________________________________
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.

  • Follow-Ups:
    • Re: getting the date
      • From: Christopher Stone <email@hidden>
    • Re: getting the date
      • From: Walter Ian Kaye <email@hidden>
  • Prev by Date: Re: getting the date
  • Next by Date: Re: getting the date
  • Previous by thread: Re: getting the date
  • Next by thread: Re: getting the date
  • Index(es):
    • Date
    • Thread