Write a SQL query to determine the joining date dynamically for the last 6 months in a company database.