As documented, the
datepart() function helps us to retrieve different parts of the date; month, day or year. Our question is specific to extracting
When the date is suppose
April 4, 2019 we get the day as 4, single digit number. And when date is
April 24, 2019, we get the day as 24, expected.
Is it possible to obtain 2 digit day without using any sort of manual concatnation?
datepart(2019-04-4,'DAY') shd give 04 rather than 4.
Advice/help is greatly appreciated.