Home

yearweek

Yearweek is a combined representation of a calendar year and a week number used to label weekly intervals in time-series data, reporting, and scheduling. It allows analysts to group or compare data on a weekly basis without relying on specific calendar dates.

The most widely used convention is the ISO-8601 week date system. In ISO weeks, weeks start on

In practice, yearweek values can be derived from dates using various functions. For example, many SQL dialects

Yearweek systems must address cross-year boundaries. Some years have 53 ISO weeks, causing the final weeks of

Uses for yearweek include weekly sales analysis, weather patterns, project timelines, and any scenario needing stable

Monday,
and
Week
1
is
the
week
that
contains
the
year's
first
Thursday
(equivalently
the
week
with
January
4).
A
yearweek
value
is
often
written
in
a
format
such
as
2024-W23
or,
in
some
databases,
as
202423
(year
followed
by
the
two-digit
week).
Different
systems
may
use
different
formats,
so
it
is
important
to
know
the
convention
in
use
when
integrating
data
from
multiple
sources.
offer
a
YearWeek
or
YEARWEEK
function
that
returns
a
numeric
year-week
representation.
Programming
languages
provide
equivalents
based
on
isocalendar
or
ISO
week
calculations.
The
key
point
is
that
yearweek
encodes
the
week
label
rather
than
a
precise
day,
which
can
simplify
weekly
aggregations
but
requires
consistent
handling
across
tools.
a
year
to
belong
to
the
next
year’s
sequence,
and
the
first
weeks
of
the
new
year
may
belong
to
the
previous
year’s
ISO
week
count.
This
can
affect
reporting
continuity
and
alignment
with
fiscal
calendars.
weekly
grouping.