Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
J

Jame_T

@Jame_T
About
Posts
1
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Given two dates, count the number of dates in the range that is within month X
    J Jame_T

    I have a MySQL table with start and end dates. E.g rows like this:

    start | end
    2022-03-01 | 2022-04-10
    2021-12-01 | 2022-03-11
    2022-01-01 | 2022-04-05
    ...

    I want to count how many of the days in those ranges (all rows) were in April 2022 for instance. The first record has 10 days in April, the third record has 5 days in April, so the result should be 15.

    Database mysql
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups