Re: getting the date
Re: getting the date
- Subject: Re: getting the date
- From: Graff <email@hidden>
- Date: Tue, 30 Dec 2003 12:36:25 -0500
This solution should work fine. It is independent of any localization
settings that you may have for date and time formats. I believe it
requires AppleScript 1.9 or later.
-------------
on ZeroPad(theNumber)
set theString to ""
if theNumber is less than 10 then set theString to "0"
set theString to theString & theNumber
return theString
end ZeroPad
set theDate to current date
set dayString to ZeroPad((day of theDate) as integer)
set monthString to ZeroPad((month of theDate) as integer)
set yearString to ZeroPad((year of theDate) mod 100)
set theDateString to yearString & monthString & dayString
-------------
- Ken
On Dec 30, 2003, at 10:37 AM, Simon Kidd wrote:
Iam trying to make a folder with the current date, Ive found that:
set days_date to current date
gives me the date and time in this format "date "Tuesday, 30 December,
2003 10.34.27am""
is there a way of getting the date like so: "031230"
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.