---
title: "Discussion on \"Counting Weekends between Two Dates in PostgreSQL\" | Hashnode"
description: "Discussion on \"Counting Weekends between Two Dates in PostgreSQL\". I found myself the problem of counting the occurrence of specific \"days of the week\" between two dates; for, of course, generating features for a predictive analysis task. For example, the number of Fridays and Saturdays between 2019-01-01 and 2019-0..."
url: "https://hashnode.com/posts/counting-weekends-between-two-dates-in-postgresql/65d36e85afd0bb77b7d1acbb"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Counting Weekends between Two Dates in PostgreSQL](https://blog.adhikary.net/counting-weekends-between-two-dates-in-postgresql?utm_source=hashnode&utm_medium=feed)

I found myself the problem of counting the occurrence of specific "days of the week" between two dates; for, of course, generating features for a predictive analysis task. For example, the number of Fridays and Saturdays between 2019-01-01 and 2019-0...

Mar 22, 2019 · 3 min read · blog.adhikary.net  
Read the article

-   [#sql](https://hashnode.com/tag/sql)

## Written by

[Aniruddha Adhikary](https://hashnode.com/@tuxboy)

@tuxboy · Singapore

  
[View profile](https://hashnode.com/@tuxboy)

Engineering Public Good and Human Welfare

A Software Engineer passionate about public good projects and making technology to serve society en masse.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
