If you have a date and want to convert into a day number, you can use either the Day Function or the Text Function.
When using the Day Function, by default, it returns one digit day number if the date is from the first day to the ninth day of the month, while the Text function will return a text string.
For example, 5/8/2011 will return 8 when using the day function, and return to 08 or the weekday when using the text function.
To convert a date to a day number with 2 digits (e.g., 08), please copy the formula and change the cell name.
=Text(A2,"DD")
If you simply convert a date to a day number as it is, please use the DAY function with the formula below.
=DAY(A2)
Just in case you want to turn the day into 3 digits (e.g., 008), please copy the formula and change the cell names.
=TEXT(DAY(A2),"000")
Another method is to format the date into the day number with two digits with the steps below:
Step 1: Select the date range and click the "Home" tab from the ribbon;
Step 2: Click the right bottom corner in the "Number" group;
Step 3: In the "Format Cell" window, click "Custom" and type "dd" in the type box;
Step 4: Click "OK" at the bottom.