Video summary
5 Ways to Create a Date 📅 in Power Query
Main summary
Key takeaways
Creating and Interpreting Dates in Power Query
The video presents five ways to create or correctly interpret dates when the source data does not contain a usable date column.
-
Create a date from a month number and year
- Add a Custom Column and use Power Query’s
#datefunction. - Provide the year, month number, and day. If the source has no day, use
1to represent the first day of the month. - The year, month, and day inputs must be numeric.
- You can specify
type dateas the column type in the custom-column expression.
- Add a Custom Column and use Power Query’s
-
Create a date from a month name and year
- Concatenate the month name with the year, then convert the result to a date.
- If the year is numeric, first convert it to text with
Text.From. - After joining the values, change the resulting column’s type to Date.
-
Create a date from a year alone
- Choose a consistent date to represent the year, such as January 1 or December 31.
- Use
#datewith the year and the chosen month and day. For example, January 1 uses month1and day1. - Set the result’s type to Date.
-
Convert a
YYYYMMDDvalue into a date- If year, month, and day appear together without separators, converting the column directly to a date may produce errors when Power Query has inferred inconsistent types.
- First convert the entire column to Text, then convert it to Date.
-
Handle dates written in a different regional format
- If the computer’s locale expects a different date order—for example, day-month-year instead of month-day-year—select Change Type → Using Locale. Choose the appropriate date type and locale, such as English (United States).
- Mixed values, especially those containing timestamps, can still be misread. A timestamp may prevent the locale conversion from interpreting some values correctly.
- One interface-based fix is to extract the text before the space to remove the timestamp, then apply the date type using the correct locale.
- Alternatively, create a new column that:
- Checks the value’s type with
Value.Type. - Uses
Date.Fromto remove the time if the value is adatetime; otherwise, keeps the existing value. - Converts the result to text with
Text.From. - Parses it using
Date.Fromwith the US culture,"en-US". - Sets the final column type to Date.
- Checks the value’s type with
- Once the new date column is correct, remove the original column if it is no longer needed.
Speakers and Sources
- Chandeep, presenting for Goodly.
- The video includes Power Query demonstrations and brief background music at the end.
Rate this summary
Your feedback will help improve summaries.
Improve this summary
Reprocess with a stronger model when the summary feels incomplete or inaccurate.
Translate summary in another language
Ask questions to this video
Chat for follow-up questions, clarifications, and source-backed answers.