Question:Do you know how to write a query in DB2 that would display records based on the last month eg. Take todays date and then display last 31 days ? In other words, I need to subtract some days from a timestamp Answer: Without actual details I can’t supply a specific query, but I can share with you a pattern, allowing you to apply in your query. The basic concept: CURRENT_TIMESTAMP - 31 DAYS This example query will return the date from 31 days ago db2 "select date(current timestamp – 31 days) from sysibm.sysdummy1" How you construct the statement will... Read more →