Re: text manipulation
Re: text manipulation
- Subject: Re: text manipulation
- From: Greg Strange <email@hidden>
- Date: Tue, 05 Jun 2001 13:44:54 -0500
on 6/5/01 11:47 AM, email@hidden at email@hidden wrote:
>
I have a time string as follows "10:56 am". I have been trying to figure out a
>
way to change "am" to "a.m." or to "a.m", with no luck : ). Anybody have a
>
clue? Thanks.
>
>
John
>
_______________________________________________
>
applescript-users mailing list
>
email@hidden
>
http://www.lists.apple.com/mailman/listinfo/applescript-users
set theTime to "10:56 am"
set AppleScript's text item delimiters to " "
set timeParts to the text items of theTime
repeat with i in item 2 of timeParts
set dottedMeridian to dottedMeridian & i & "."
end
set outTime to item 1 of timeParts & " " & dottedMeridian
Hope that helps. And of course, I am on a Windows machine at work so that
is completely untested.
Greg Strange
--
Dysfunction:
The only consistent feature of all your
dissatisfying relationships is you.