Re: Filemaker changes 04 to 1904
Re: Filemaker changes 04 to 1904
- Subject: Re: Filemaker changes 04 to 1904
- From: Malcolm Fitzgerald <email@hidden>
- Date: Thu, 28 Oct 2004 12:27:31 +1000
Eric Geoffroy wrote:
set s to date "Friday, October 22, 2004 12:00:00 AM"
short date string of s
-- returns "10/22/04"
That's where I wish it said 2004.
On 10/27/04 5:57 PM, "Malcolm Fitzgerald" <email@hidden> wrote:
set d to (get current date)
set dateString to short date string of d
set dateString to text 1 thru 6 of dateString & year of d
--> "28/10/2004"
then Andrew Oliver wrote:
And on January 1st 2005 you get 1/1/052005
silly, silly me!
set dateString to text 1 thru -3 of dateString & year of d
Though now Michelle has piped up everyone will have changed their
preferences ;-)
It's more reliable to use chunks:
words of (short date string of current date)
-- {"28", "10", "04"}
but the order of month and day is a matter of preference
set d to current date
set {dMth,dDate} to words of (short date string of d) -- MM/DD/YY
set {dDate,dMth} to words of (short date string of d) -- DD/MM/YY
set strDate to dDate & "/" & dMth & "/" & year of d
Does this line require localisation:
set dMth to (offset of (text 1 thru 3 of (month of d as string)) in
"..janfebmaraprmayjunjulaugsepoctnovdec") / 3
--
Malcolm Fitzgerald phone: 02 9318 0877
Database Manager fax: 02 9318 0530
The Australian Society of Authors <http://www.asauthors.org>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden