Summary

Overview

This course segment focuses on date manipulation in a data processing tool (likely Power BI or similar), covering two key operations: extracting components from date fields (year, quarter, month name) and modifying dates by adding or subtracting time units (years, months, days, hours). The trainer demonstrates these functions using Spanish-language settings and guides learners through practical steps to prepare and transform date data for analysis.

Topic (Timeline)

1. Extracting Date Components [00:00:00 - 00:02:48]

The trainer begins by accessing the date menu and selecting the “Extract Date Part” function. They demonstrate extracting three specific components from a date field: the year, the quarter (referred to as “cuartel”), and the month name in Spanish. The process involves selecting these three fields, removing unnecessary time elements (hours and minutes), and applying the transformation. The output generates three new columns: one for the year, one for the quarter (e.g., “primer”, “segundo”, etc.), and one for the full month name in Spanish (e.g., “enero”, “febrero”). The trainer confirms the correct language setting (Spanish) is active and validates the results after applying the transformation.

2. Modifying Dates with Time Operations [00:02:51 - 00:04:28]

The trainer then moves to the “Modify Date” function, the final option in the date menu. They show how to increment or decrement dates by specifying a time unit (years, months, days, or hours) and a numeric value. Using a fixed value of 1 and selecting “years” as the unit, they demonstrate adding one year to each date in the selected column. The trainer notes that negative values can be used to subtract time (e.g., -1 to remove a year). After applying the transformation (“sumi”), the updated dates are displayed, confirming successful modification. The session concludes with the trainer announcing a break and instructing participants to reconvene at 3:00 PM Mexico time.

Appendix

Key Functions Used

  • Extract Date Part: Extracts year, quarter, and month name from a date field.
  • Modify Date: Adds or subtracts years, months, days, or hours to a date column using a fixed value or reference column.

Language Settings

  • All operations were performed with Spanish locale enabled; month names and quarter labels appear in Spanish.

Common Use Cases

  • Grouping data by year, quarter, or month for reporting.
  • Adjusting dates for fiscal periods, contract renewals, or historical comparisons.

Tips

  • Ensure language settings match your target output (e.g., Spanish month names).
  • Use negative values in “Modify Date” to subtract time units.
  • Remove unwanted time components (hours/minutes) before extraction to avoid clutter.