Totime can be used if you need to transfer hour, minute and seconds to a single field in the destination.
Example:
Source holds hours, minutes and seconds in separate fields, and needs to be transferred into a Time field in the destination.
sHour = 12
sMinute= 44
sSecond= 23
##TOTIME("sHour", "sMinute", "sSecond")
Return Value= 12:44:23 as a Time
Example of TODATE and COPY:
##TODATE(COPY(Date,6,2),COPY(Date,4,2),COPY(Date,0,4));
In the source table we have the field "Date" which contains the date format YYYYMMDD (for example: 20090515). The corresponding field in the destination table contains the date format DDMMYYYY.
In the source field, Copy will go to position 6 and copy the following two signs (DD - 15) to the destination field. Then it will go to position 4 and copy the following 2 signs (MM - 05). Then it will go to position 0 and copy the following 4 signs (YYYY - 2009).