How to get Zero (0) before Month ?
How to get Zero (0) before Month ?
- Subject: How to get Zero (0) before Month ?
- From: Krister Nyman <email@hidden>
- Date: Sun, 16 Feb 2003 16:35:40 +0100
When I use this script :
set the_months to "January February March April May June July August
September October November
December"
set message_date to current date
set mess_year to year of message_date as string
set mess_day to day of message_date as string
set day_count to count characters in mess_day
if day_count = 1 then set mess_day to "0" & mess_day
set mess_month to month of message_date as string
repeat with x from 1 to count words in the_months
if mess_month = word x of the_months then set month_count to x as
string
end repeat
set date_format to mess_year & "/" & month_count & "/" & mess_day
I get result "2003/2/16" thats great, but I wonder how to get this
"2003/02/16" ?
I always want to have month in two numbers, 01,02,03,04,05.....10,11,12
like it is with days.
MacOS 9.2.2
Regards
Krister Nyman
_______________________________________________
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.