• 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: Changing current date format
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changing current date format


  • Subject: Re: Changing current date format
  • From: "koenig.yvan" <email@hidden>
  • Date: Sun, 19 Jan 2014 17:41:49 +0100


Le 19/01/2014 à 17:17, JF <email@hidden> a écrit :

The (current date) format in a script automatically results in this output:
Sunday, 19 January 2014 16:11:27
which is too much for an email subject.

I have tried:
(do shell script "date +%Y-%m-%d") which produces
2014-01-19
which I can rearrange, but I cannot change the 01 to "January" by adding mmmm (as in Microsoft Office).

How can I set the current date to read: 17Jan2014 or 17 January 2014?
and without the time

Thanks for any help


I read carefully your question so you may try to run this code :

(do shell script "date +%Y-%m-%d")
--> 2014-01-19 
set {y, m, d} to words of result
--> {"2014", "01", "19"}
(((d as number) - 2) as text) & text ((m * 3) - 2) thru (m * 3) of "JanFebMarAprMayJunJulAugSepOctNovDec" & y
—> "17Jan2014"

Yvan KOENIG (VALLAURIS, France) dimanche 19 janvier 2014 17:40:49



 _______________________________________________
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

References: 
 >Changing current date format (From: JF <email@hidden>)

  • Prev by Date: Changing current date format
  • Next by Date: Re: Changing current date format
  • Previous by thread: Changing current date format
  • Next by thread: Re: Changing current date format
  • Index(es):
    • Date
    • Thread