Forum Discussion
vuvcpg
Apr 16, 2023Copper Contributor
If I get the time twice in one SQL, is it possible to get different results?
eg:
SELECT DATEDIFF(millisecond, GETDATE(), GETDATE())
and
SELECT DATEDIFF(millisecond, GETDATE(), CURRENT_TIMESTAMP)
Can I get a number greater than 0 millisecond?
- olafhelperBronze Contributor
SELECT DATEDIFF(millisecond, GETDATE(), GETDATE())vuvcpg , what on earth do you expect here for a result different the 0 milliseconds? The function GETDATE() is evaluated at once, so the query can't ever return something different the 0 ms.