I need to declare two dates in \"Ymd\" format: $toDate and $fromDate.
\"Ymd\"
$toDate
$fromDate
$toDate represents today\'s date and
Use the magic of strtotime:
$fromDate = date("Ymd", strtotime("-4 months"));