Date Formatter, easy way to get the result?

I have a text box that I added the Date Formatter onto, and it will correctly display the date as I have specified, such as “2/17/06”, and I would like to get that exact text from the box. When I “get contents” of that text field I get the entire “Thursday February 17, 2006, 3:00:00pm”. If I get the “title” I get an error. I was hoping there was and “easy” way to retrieve “2/17/06”.
I know how to get each element if I need to do it ‘manually’ but was hoping there was a short line of code that can automatically do it.
TIA, Chris



set x to short date string of (date "Friday, February 17, 2006 03:00:00")

Best wishes

John M

You might be able to get the ‘string value’ property also I think.

string value of theObject


string value of textFieldReference


I believe a date formatter will give you a date object (the same think you would get from something like “current date”). You’ll have to grab the information from it yourself. (“short date string” depends on your preferences.)

No, you see a ‘text view’ inherits some properties of ‘control’ and a property of control is ‘string value’ i.e. the text of the control.

Using this is much better than ‘short date’ as this is a standard additions modification.

string value of … works great