Extracting information from datetime variable.
DateTime d = DateTime.Today;
d.Day -> Extracts the day
d.Month-> Extracts the month
d.Year -> Extracts the year
Similarly TimeOfDay,Ticks,Seconds,Minute,Millisecond,Hour,DayOfWeek,DayOfYear can also be extracted.
If you found this solution helpful or have something extra to add, feel free to share it here by commenting below.

On which platform its work?