convert ssis expression datetime to int
问题 I want to calculate last friday's date in ssis. Below code is doing it. DATEADD("dd", -1 - (DATEPART("dw", getdate()) % 7), getdate()) But it gives results for datetime datatype and I want results for int data type in ssis. How to convert? DATEADD("dd", -1 - (DATEPART("dw", getdate()) % 7), getdate()) 回答1: According to this Microsoft article: When a string is cast to a DT_DATE, or vice versa, the locale of the transformation is used. However, the date is in the ISO format of YYYY-MM-DD,