Skip to content

dim.date

The dim.date is a standard date dimension present in most data warehouses. It allows you to analyze the trends and patterns in your data over a specific timeframe. While computing values with different functions, it's typically better to maintain a precalculated calender.

Column NameData TypeDescriptionExample
date_skDATEThe actual date. One row for every day from the year 2020 till year 2069.09-12-2069
date_startDATEThe start of the day to join tables.09-12-2069
date_endDATEThe end of the day to join tables 10-12-2069
time_startTIMEThe time at which the day begins.00:00:00
time_endTIMEThe time at which the day ends.23:59:59
yearINTYear of the date.2069
monthINTMonth of the date.12
dayINTDay of the date.9
dowINTDay of week, with Sunday being day 1.2
weekINTThe US week number.50
iso_dowINTDay of week, with Monday being day 1.1
iso_weekINTThe ISO weekday (Starting monday).50
dow_nameVARCHAR(50)The name of the day of week.Monday
yyyymmVARCHAR(7)Date in the format “YYYY-MM”.2069-12
yyyymmddVARCHAR(10)Date in the format “YYYY-MM-DD”.09-12-2069
is_weekendBOOLEANIs this day a weekend?False

ISO-8601 (International Organization for Standardization) calendars have a consistent number of weeks in each quarter and a consistent number of days each week. The purpose of the ISO-8601 calendar is to provide a consistent and clear method to represent and calculate dates. ISO-8601 calendars divide dates into years, quarters, weeks, and weekdays. The standard provides a well-defined, unambiguous method of representing calendar dates and times in worldwide communications, especially to avoid misinterpreting numeric dates and times when such data is transferred between countries with different conventions for writing numeric dates and times.