Redshift gives us an easy way to get the date of the last day of a month. We no longer need to do date based calculations or tricks with date parsing. All we need is the last_day
function.
The last_day
function requires one parameter: a date or a timestamp. As the return value we will get the last day of the same month as the one given in the parameter. For example, if I pass 2020-12-18
to the function, I will get 2020-12-31
:
select last_day(to_date('2020-12-18','YYYY-MM-DD'))
Subscribe to the newsletter
I help fintech teams stop AI hallucinations before they spark compliance nightmares or customer churn.
Why join?
- Straight-to-the-point articles on measuring and fixing hallucinations.
- Playbooks for advanced RAG tuning, guardrails, and evaluation you can copy-paste.
- Case studies from real deployments, not "Hello World" demos.
What to expect:
- 3-4 actionable emails per month.
- Proven expertise: 500+ articles & 1k+ engineers trained.
- Zero fluff, zero spam — just tactics that make your LLM stack safer.
Subscribe