I'm sorry. I'm disturbing your. I have a question about conversion of SQL Server Query to Teradata Query about DateTime function.
If anyone can help me in conversion of query to teradata;
replace(convert(varchar(10),convert(datetime,convert(varchar ,(lk.DATECOLUMN+1)),110),111),'/','-') as COLUMNDATE
FROM TABLE lk
By the way, date formats;
Thanks in advance
Either I don't get it or the query does not make sense even in SQLServer...
It seems you are looking for a final string (VARCHAR) with format YYYY-MM-DD. In this case:
SELECT CAST(CAST(DATECOLUMN+1 AS FORMAT 'YYYY-MM-DD') AS VARCHAR(10)) FROM lk;
btw: In Teradata DATEs are DATEs, no DATETIMEs. If your data is DATETIME you should use a TIMESTAMP in Teradata, and the '+1' arithmetics should be:
SELECT CAST(CAST(DATECOLUMN+CAST(1 AS INTERVAL DAY) AS FORMAT 'YYYY-MM-DD') AS VARCHAR(10)) FROM lk;