Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: newbie question..



On Wednesday, August 6, 2003, at 03:24 PM, Martha Espinosa wrote:

I'm beating my head on this one...

In a Eudora message I have a list of items separated by a comma such as:

Martha, was, born, on, 12/04/03 23:00:43

What I am trying to do is get the information from the body of the message and store to variables. I am having problems with the date. I just want the date and I want to forget about the time

Try this, Martha

------------

set theText to "Martha, was, born, on, 12/04/03 23:00:43"
set oldDelims to AppleScript's text item delimiters
set AppleScript's text item delimiters to ", " -- comma, space
set theLongDate to text item -1 of theText
--> 12/04/03 23:00:43
set AppleScript's text item delimiters to " " -- space
set JustTheDate to text item 1 of theLongDate
--> 12/04/03
set AppleScript's text item delimiters to oldDelims

------------

djb

Dave Balderstone
Director, Production and Creative Services
Western Producer Publications, Saskatoon, SK, Canada
Phone: 306-665-3545 Fax: 306-933-3536
_______________________________________________
applescript-studio mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-studio
Do not post admin requests to the list. They will be ignored.

References: 
 >newbie question.. (From: Martha Espinosa <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.