Hi,
For one of the requirement, i wanted to use "DateDiff" function of SQL server in MT cloud but it is not available.
Is there any alternative solution to achieve this in MT cloud SQL load query editor?
Thanks,
Shivanand
Hi Shivanand,
the Staging database does not support Datediff because it is not ANSI 92 compatible. You can subtract two datetimes and cast it as a number. Then you get a result in days, which you can convert to hours, minutes, and so on.
Please see the example:
NOTE: Infor Data Lake supports DateDiff (it is a different technology), so if you have a load query against the DL, you can use it there.
Best,
Standa
I am not 100% sure from the question where you need the function but if you need to process query results Application Engine has the GetDurationInMilliseconds function that does what it says on the tin.
Thanks StandaThe EXTRACT() function is standard in sql-92. It doesn't seem to work for me right now - is there any plan to support it in the future?
Best
Nathan