Summary
In this chapter, we covered the topics of dates, times, dates and times, time zones and durations. The majority of the functions dealing with these data types were covered, and we explored some practical applications of using these functions, including Melissa de Korte’s famous Extended Date Table, the creation of functions for converting between Gregorian dates and Julian days, and handling alternate date formats. We also covered examples of calculating the number of working days between two dates and how to calculate a moving average. With respect to time, we demonstrated the creation of a time dimension table at both the minute and second level of granularity and how to classify time into first, second, and third shifts. Dates and times were also covered and included an example for correcting data refresh times. Finally, durations were discussed, with examples of calculating work duration and converting work days to durations.
In the next chapter, we continue...