I think you can run into the problem of the language setting.
You could use a systemdate but in the simulator it is the same as the date i.e. the english date 04/16/12
I don't know how this will change if you use it on a device with the systemDate set to 16/04/12.
You could test to convert the result to systemDate and see what that does. If it works you would have the expected date format for the system setting.
If that does not work you could reformat 04/16/12
Code: Select all
on mouseUp
put "04/16/12" into tEnglishDate
set the itemDelimiter to "/"
put tEnglishDate into tLocalDate
put item 2 of tEnglishDate into item 1 of tLocalDate
put item 1 of tEnglishDate into item 2 of tLocalDate
put tLocalDate
end mouseUp
This all depends on where you want your app to work, internationally or locally.
maybe there is a more elegant solution but I am not aware of any.
KInd regards
Bernd