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

Re: date format


  • Subject: Re: date format
  • From: Andy Wylie <email@hidden>
  • Date: Wed, 28 Nov 2001 07:49:28 +1300

on 28/11/01 5:12 AM, Marc K. Myers at email@hidden wrote:

>> Date: Tue, 27 Nov 2001 17:49:25 +1300
>> Subject: Re: date format
>> From: Andy Wylie <email@hidden>
>> To: <email@hidden>
>>
>> on 27/11/01 2:19 PM, Landis at email@hidden wrote:
>>> I need:
>>>
>>> "9/3/2001"
>
> [Snip!]
>
>> --Akua Sweets OSAX
>> the clock using form "%d/%m/%y"
>> -- "27/11/01"
>
> Unfortunately, Akua Sweets would give you "09/03/01", which wouldn't
> match "9/3/2001" on a string comparison. I don't know FMP, so I don't
> know if that would work. You can extract the date elements without the
> leading zeros (and with the century) using Akua Sweets with this rather
> clumsy construction:
>
> set theDate to "" & ((the clock using form "%m") as number) & "/" & [optn-L]
> ((the clock using form "%d") as number) & "/" & (the clock using
> form "%c%y")
>

the clock using form "%d/%m/%c%y"
--> "28/11/2001"

Fast standing still but speed tests reveal 'french vanilla' is far faster,
it's an interesting piece of code to speed test and see the effects of
various forms, this is as fast as I could get it...
-----------------
set curDate to date "Thursday, 4 May 1961 11:30:00 AM"
copy (curDate) to b
set month of b to January
pack(0 & (curDate's day), 0 & (1 + ((curDate) - b + 1314864) div 2629728),
((curDate's year as string)'s text -1 thru -2))

to pack(dd, mm, yy)
set shortDate to {dd, "/", mm, "/", yy} as string
end pack
-----------------
thanks to Christopher Stone for the prompt

_____________________________ Andy


  • Follow-Ups:
    • Re: date format
      • From: Andy Wylie <email@hidden>
References: 
 >Re: date format (From: "Marc K. Myers" <email@hidden>)

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