Code: Select all
put text of fld "Date1" into tDate
put char 4 to 5 of tDate & "/" & char 1 to 2 of tDate & "/" & char 9 to 10 of tDate into fld "Date1"
Very big thanks to all,
kindest regards
wee
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Code: Select all
put text of fld "Date1" into tDate
put char 4 to 5 of tDate & "/" & char 1 to 2 of tDate & "/" & char 9 to 10 of tDate into fld "Date1"
Code: Select all
on mouseUp
put text of fld "Date1" into tDate
set the itemdelimiter to "/" -- this lets you treat a slash as itemDelimiter
put item 2 of tDate into item 1 of tDestFormat -- items are automatically formed with the current itemDelimiter
put item 1 of tDate into item 2 of tDestFormat
put char -2 to - 1 of item 3 of tDate into item 3 of tDestFormat -- get only the last two digits
set the itemdelimiter to comma -- be nice and reset the itemDelimiter, would be reset at end of handler anyways though
answer tDestFormat
end mouseUp