Re: Current date notation
Re: Current date notation
- Subject: Re: Current date notation
- From: Paul Berkowitz <email@hidden>
- Date: Fri, 11 May 2001 09:25:04 -0700
On 5/11/01 8:49 AM, "Marc K. Myers" <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
>
>
I haven't noticed any mention of my favorite way of formatting dates,
>
Akua Sweets' "the clock". To get the desired format, all you need is:
>
>
set x to the clock using form "%m-%d-%c%y"
>
--> "05-11-2001"
Yes, Akua Sweets' 'the clock' is the most versatile of all the date osaxen.
As well as being able to specify precisely the format as above, with many.
many alternatives including full and abbreviated versions of months and
weekdays. years in 2-dii and 4-digit format, etc. (BTW the questioner here
actually wanted
"%d-%m-%c%y"
), it will also get you unknown users' own short format as set by their own
Date & Time control panel in their own regional language with the parameter
set x to the clock using system form "%d"
with adjustments for including seconds, or using abbreviated format in
regional language, etc. etc. All its alternative parameters also work for
any date, not just current date, by the simple insertion of 'from [date]':
set x to the clock from date "Saturday, November 3, 2001 12:00:00 AM"
using form "%d-%m-%c%y"
--"03-11-2001"
set x to the clock from date "Saturday, November 3, 2001 12:00:00 AM"
using system form "%e"
-- "Sat, Nov 3, 2001"
--
Paul Berkowitz