I have a bit trouble in converting CURRENT DATE into a integer type as YYYYMMDD.
The following script is trying to find a day matching a date column with integer type with yesterday (CURRENT DATE - 1 DAY).
[column name of integer type] = YEAR(CURRENT DATE - 1 DAY) * 10000 + MONTH(CURRENT DATE - 1 DAY) * 100 + DAY(CURRENT DATE - 1 DAY)
It doesnt give the correct result. Actually the calculation result from right side of the equation doesnt match with any values in the column. Can anyone help me figure out what's wrong with the above statement?
The following script is trying to find a day matching a date column with integer type with yesterday (CURRENT DATE - 1 DAY).
[column name of integer type] = YEAR(CURRENT DATE - 1 DAY) * 10000 + MONTH(CURRENT DATE - 1 DAY) * 100 + DAY(CURRENT DATE - 1 DAY)
It doesnt give the correct result. Actually the calculation result from right side of the equation doesnt match with any values in the column. Can anyone help me figure out what's wrong with the above statement?
Comment