Skip to content

Instantly share code, notes, and snippets.

@stasgm
Created May 4, 2016 17:02
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stasgm/29b0dc83b2746929f87a3763751b4368 to your computer and use it in GitHub Desktop.
Save stasgm/29b0dc83b2746929f87a3763751b4368 to your computer and use it in GitHub Desktop.
Firebird SQL - First/last day of month
select
current_date - EXTRACT(DAY FROM current_date) + 1 FirstDay,
current_date - EXTRACT(DAY FROM current_date) + 32 - EXTRACT(DAY FROM current_date - EXTRACT(DAY FROM current_date) + 32) LastDay
from
rdb$database
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment