In any version of Windows, when you sort items in a folder in descending order by Date Modified column, folders move to the bottom, and files go to the top. However, users may want to sort folders separately and have them remain at the top and files below. For example, the following is the usual behavior.
To achieve the sort order you prefer, first, sort by the “Date Modified” column in descending order. Then do a secondary sort by Name. This is done by holding the Shift key and clicking on the Name column header. Thus folders remain at the top.
There is another option to accomplish the same result. Use the Date column instead of Date Modified. To add the Date column, right-click on the column header and click More…
These excellent tips were posted by otaru1921 and raxmus at the Microsoft forums thread Sort files by date with folders on top. Once sorted in the Details view, you can change the views while preserving the primary and secondary sort orders.
However, note that the Date and Date modified fields are not the same. If metadata is embedded in a file, the Date column shows the last saved metadata instead of the date you downloaded it. For example, I downloaded an image file where the Date and Date Modified fields show different data. Date Modified shows the actual date I downloaded the file, but the Date field shows the last saved information from the file’s EXIF.