---
schema_version: "1"
id: fc1a76893d7446c7442cf19803825b3515151c2f8702211fbfec6ec3d58755f2
title: Analyze Your Data Over Time
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/analytics/bi_dev_guide_saql/guides/concept/bi-saql-examples-dates.md
canonical_url: https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-examples-dates.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 1567dc4c60d69fada0256b1564bf1c6373114126dba4179e9d0f3126f23b4a51
products:
  - Analytics SAQL Developer Guide
  - analytics
---

# Analyze Your Data Over Time

Use SAQL date functions for advanced time-based analysis.

**note:** You can use date filters in the dashboard for basic time-based analysis, for example to calculate month-to-date amounts. You can also use window functions in the dashboard for basic date range calculations, such as calculating the change in year-over-year earnings

## Example - on Which Weekday Do Customers Send the Most Emails?

Suppose that you want to see which day of the week your customers are most active on email. This information allows you to better target your email campaigns. Use `day_in_week()` on the `Mail_sent_sec_epoch` field to calculate the day of the week, then count the number of records for each day.

```nolang
q = load "DTC_Opportunity_SAMPLE";
q = foreach q generate day_in_week(toDate(’Mail_sent_sec_epoch’)) as 'Day in Week';
q = group q by 'Day in Week';
q = foreach q generate 'Day in Week', count() as 'count';
```

In this case, email traffic is slightly higher on day 4 (Wednesday) and day 7 (Sunday).

![Derived dimension shows time to win](https://developer.salesforce.com/media/bi_dev_guide_saql/bi_saql_num_emails.png)

**See Also**

- [Date Functions](https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/reference/bi-saql-functions-date.md)
