From 1505053090a905433a09c492c3b006971e4b0014 Mon Sep 17 00:00:00 2001 From: Dan Howe Date: Wed, 18 Jul 2018 07:36:00 +1000 Subject: [PATCH] Format date string correctly --- las_outputs.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/las_outputs.py b/las_outputs.py index cd6982f..edfd6db 100644 --- a/las_outputs.py +++ b/las_outputs.py @@ -128,7 +128,8 @@ def plot_profiles(profile_name, survey_date, csv_output_dir, graph_loc, ch_limit ax = plt.axes() for col in profiles.columns: profile = profiles.loc[ch_min:, col] - date = '{}-{}-{}'.format(survey_date[:4], survey_date[4:6], survey_date[6:]) + date_str = str(survey_date) + date = '{}-{}-{}'.format(date_str[:4], date_str[4:6], date_str[6:]) ax.plot(profile.index, profile, label=date)