Hi
i know this question is pretty trivial, but i am struggling on the create function command.
I want to create a function which takes in a column of datetimes and spits out a column of strings (some operations performed on the dates that are returned)
I have looked and looked but i cant seem to get the syntax down correctly.
Could someone PLEASE provide me with a template. Heres the sql code that will go in the function:
VARCHAR(DATE(t1)) CONCAT ' ' CONCAT
VARCHAR(CHAR(TIME(t1), JIS)) CONCAT '.' CONCAT
LTRIM(RTRIM(LEFT(VARCHAR(CHAR(MICROSECOND(t1))), 3))) CONCAT
REPEAT('0', 3 - LENGTH(LTRIM(RTRIM(LEFT(VARCHAR(CHAR(MICROSECOND(t 1))), 3)))))
Thank you