diff --git a/src/mixpanel_utils/__init__.py b/src/mixpanel_utils/__init__.py index 6d41ab3..51fd595 100755 --- a/src/mixpanel_utils/__init__.py +++ b/src/mixpanel_utils/__init__.py @@ -1363,10 +1363,8 @@ def export_events( datetime.date(d.tm_year, d.tm_mon, d.tm_mday) + datetime.timedelta(x) ).strftime(date_format) - file_components = output_file.split(".") - current_file = file_components[0] + "_" + current_day - if len(file_components) > 1: - current_file = current_file + "." + file_components[1] + base, ext = os.path.splitext(output_file) + current_file = base + "_" + current_day + ext params_copy["from_date"] = current_day params_copy["to_date"] = current_day