更新时间:2022-05-08 07:11:33
T-SQL中的TO_CHAR等价物是CONVERT。
The TO_CHAR equivalent in T-SQL is CONVERT.
CONVERT(varchar(20), myDate)
ADD_MONTHS转换为DAT EADD
ADD_MONTHS translates to DATEADD
DATEADD(month, myDate)
相当于Oracle TRUNC(date)是两个CONVERT函数的组合,一个用于转换为varchar并提取时间值,另一个用于将其转换回日期。
The equivalent of Oracle TRUNC(date) is a COMBINATION of two CONVERT functions, one to convert to varchar and extract the time value and the other to convert it back to date.