Le 5 sept. 2009 à 15:31:28, Doug Tallman a écrit :
For example, I get data files which have dates in the first line of text, in a variety formats, along with some non-date information.
9/14/2009 Sports Highlights Updates Sept. 14, 2009
So I have a handler that coerces the first line of text to a date, and it has worked so well that it's now in dozens, if not hundreds, of scripts.
set fileDateStamp to date paragraph 1 of myText
Bob, It appears that this works: set fileDateStamp to date (paragraph 1 of myText)
It'll be a pain to reformat all those scripts, but a lot simpler than a lot of text processing to figure out the date format.
doug
And what would be the result if the paragraph 1 is:
31/12/1943 Arpajon (Seine et Oise)
on your machine using the mm/dd/yyyy date format ?
Yvan KOENIG (VALLAURIS, France) samedi 5 septembre 2009 17:12:20
|