Lessons Learned
Time is important for understanding the universe and time is important for data analysis. In databases, times and dates have six components: years, months, days, hours, minutes, and seconds. In addition, a time zone might also be attached. The structure is complicated, but within one database, times and dates tend to be from one time zone and at the same level of precision.
As with other data types, dates and times need to be validated. The most important validations are checking the range of values and verifying that dates have no extraneous time component.
Analyzing dates starts with the values and the counts themselves. Looking at counts and aggregations over time is informative, whether the number of customers, the order size, or the amount spent. Seasonal patterns appear in the data, further showing what customers are really doing. Many businesses have weekly cycles. For instance, stops may be higher on weekdays than on weekends. Comparisons at the day level show...