---
title: "Time and Date Functions"
slug: "time-and-date-functions"
description: "The functions described in this section measure and calculate time periods in your Metrics. Use MONTHTODATE, QUARTERTODATE and YEARTODATE to accumulate data as time periods are added, with various aggregation methods available. PREVIOUS and PREVIOUSOF allow iterative calculations and let you populate blank cells from an initial Item. MOVINGSUM and MOVINGAVERAGE allow you to set a window of Items and optionally an offset to be used in a sum or average calculation."
updated: 2026-01-20T11:34:13Z
published: 2026-01-20T11:34:13Z
canonical: "kb.pigment.com/time-and-date-functions"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://kb.pigment.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Time and Date Functions

Use these functions to measure and calculate time periods in your Metrics.

MONTHTODATE, QUARTERTODATE and YEARTODATE all accumulate data as time periods are added, with various aggregation methods available. PREVIOUS and PREVIOUSOF allow iterative calculations and let you populate blank cells from an initial Item. MOVINGSUM and MOVINGAVERAGE allow you to set a window of Items and optionally an offset to be used in a sum or average calculation.
