Result: 28
SELECT DAY('2019/03/31 10:05');
Result: 31
SELECT DAY('2019/04/01 10:05:18.621');
Result: 1
Previous article: DATEPART function in SQL Server
Next article: GETDATE function in SQL Server