Extracting date components (year, month, day)
📖 Scenario: You work in a small company that keeps track of employee joining dates. You want to analyze the year, month, and day separately to find trends.
🎯 Goal: Build a small program that extracts the year, month, and day from a list of joining dates.
📋 What You'll Learn
Create a list of dates as strings in 'YYYY-MM-DD' format
Create a helper variable to store an empty list for years
Use a for loop to extract year, month, and day from each date string
Print the lists of years, months, and days
💡 Why This Matters
🌍 Real World
Extracting parts of dates helps businesses analyze trends like hiring patterns or sales by month.
💼 Career
Data analysts often need to break down dates to group and summarize data for reports.
Progress0 / 4 steps