>How to convert a datetime expression to a character expression?
>How to find the time in a datetime expression?
You can extract the time portion of a datetime as a number of seconds offset from midnight by:
nTimeInSeconds = tDateTime - DTOT(TTOD(tDateTime))
To convert a numeric variable into a human readable time expressed in hours, minutes and seconds for times less than 24 hours, try:
cTimeString = TTOC(TTOD(DATE()) + nTimeInSeconds,2)
Others have already pointed you to TTOC() to convert the datetime to a character string representing either the date and time as a human readable string ( use TTOC() with no second parameter), as a sortable character expression (you can use TTOC(...,1) to concatenate a datetime into a composite key expression) or a human-reaable time string (use TTOC(...,2) for this).
TRANFORM behaves like TTOC() with no second parameter.