Re: date format
Re: date format
- Subject: Re: date format
- From: Jean-Marie Hoornaert <email@hidden>
- Date: Tue, 27 Nov 2001 14:45:59 +0100
le 27/11/01 2:19, Landis a ecrit :
>
I'm trying to get the creation date of a JPEG and put it in a
>
Filemaker Pro database. The creation date using AppleScript looks
>
like:
>
>
"Monday, September 3, 2001 13:46:48"
>
>
which I know I can get down to just:
>
>
"Monday, September 3, 2001"
>
>
but I need:
>
>
"9/3/2001"
>
>
because that's all the date field type in FM Pro will take.
Here a script write by Jeff Baumann.
email@hidden
http://www.linkedresources.com
It returns the current date in a 2001.11.26 format, but it's
realy easy to modifie:
on frenchVanillaDottedDate()
set fullMonth to 2629728 -- 730.48 * 60 * 60
set halfMonth to fullMonth div 2 -- 1314864
set currDate to (current date)
copy currDate to janDate
set the month of janDate to January
set monthNum to (1 + (currDate - janDate + halfMonth) div fullMonth)
set mo to text -2 thru -1 of (("0" & monthNum) as string)
set da to text -2 thru -1 of ("0" & (day of currDate as string))
return ((year of currDate) & "." & mo & "." & da) as string
end frenchVanillaDottedDate
--
French is my first language, Dutch my second and ...
AppleScript my third.
Cordialement (cordially)
____________________
Jean-Marie -HOO;-)
____________________
Jean-Marie Hoornaert
email@hidden
http://www.h2o.be
AppleScripting FileMaker
French web site