I have the following SELECT clause in my Azure Stream Analytics Query:
SELECT DateAdd(mi, DateDiff(mi, 0, DateAdd(s, 30, Max(timecreated))), 0) as 'timestamp'
Which is giving the following error:
Second parameter of 'DateDiff' in expression 'DateDiff ( mi , 0 , DateAdd(s, 30, Max ( timecreated ) ) )' has invalid type 'bigint'. 'datetime' is expected.
Admittedly, the code I'm using is copied from several similar threads on StackOverflow, such as T-SQL datetime rounded to nearest minute and nearest hours with using functions, but I've no idea what to change the 0 to in my scenario.