• 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: Current date notation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Current date notation


  • Subject: Re: Current date notation
  • From: Paul Berkowitz <email@hidden>
  • Date: Thu, 10 May 2001 13:26:25 -0700

On 5/10/01 12:33 PM, "Dennis Wurster" <email@hidden>
wrote:

>> I'm looking for the syntax on current date notation. I want to have the
>> output of "Current Date" as this:
>>
>> DD-MM-YYYY
>
> Hi, try this:
>
> set monthList to {January, February, March, April, May, June, July,
> August, September, October, November, December}
>
> repeat with i from 1 to 12
> if month of (current date) = (item i of monthList) then
> set monthString to text -2 thru -1 of ("0" & i)
> exit repeat
> end if
> end repeat
>
> set dayString to text -2 thru -1 of ("0" & day of (current date))
> set resultString to dayString & "-" & monthString & "-" & year of
> (current date)
>

But instead of calling the current date osax 3 times you could set it to a
variable and just call it that once.

--
Paul Berkowitz


References: 
 >Re: Current date notation (From: Dennis Wurster <email@hidden>)

  • Prev by Date: Re: UnGrouping of boxes
  • Next by Date: Re: Newbie question
  • Previous by thread: Re: Current date notation
  • Next by thread: Re: Current date notation
  • Index(es):
    • Date
    • Thread