Skip to content

Instantly share code, notes, and snippets.

@stasgm
Last active March 1, 2019 07:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stasgm/117f99728e25e4d01a2b4cd559ae83a6 to your computer and use it in GitHub Desktop.
Save stasgm/117f99728e25e4d01a2b4cd559ae83a6 to your computer and use it in GitHub Desktop.
Calculates the first day of the month for given period
select DATEADD(month, 1, DATEADD(DAY, -EXTRACT(DAY FROM CURRENT_DATE) + 1, CURRENT_DATE)) from rdb$database
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment