commit d6d75a03d515b18f64c489bd3ba4fcd4e6026a89
Author: petrh <petrh@zcu.cz>
Date:   Mon May 11 18:37:48 2020 +0200

    Date format reworked for new datepicker

diff --git a/modules/crawler/RemoveDatasetDatabase.py b/modules/crawler/RemoveDatasetDatabase.py
index fd6b030..b7998bc 100644
--- a/modules/crawler/RemoveDatasetDatabase.py
+++ b/modules/crawler/RemoveDatasetDatabase.py
@@ -26,7 +26,6 @@ def remove_dataset_database(dataset_name):
             mydb[name].drop()
             print("Dropping: " + name)
 
-    print("Database Cleaned")
 
 print("Zadejte jméno Datasetu který chcete odstranit z databáze:\n")
 remove_dataset_database(input())
\ No newline at end of file
diff --git a/modules/crawler/Utilities/CSV/CSVDataLine.py b/modules/crawler/Utilities/CSV/CSVDataLine.py
index fa25580..90f15e7 100644
--- a/modules/crawler/Utilities/CSV/CSVDataLine.py
+++ b/modules/crawler/Utilities/CSV/CSVDataLine.py
@@ -10,8 +10,8 @@ class CSVDataLine:
         except ValueError:
             print("Occurence should be and integer value!")
 
-        if len(date) != 10:
-            raise ValueError("Invalid date format ddmmYYYYhh expected!")    
+        if len(date) != 13:
+            raise ValueError("Invalid date format YYYY-dd-mm-hh expected!")    
 
         self.name = name
         self.date = date
diff --git a/modules/crawler/Utilities/CSV/CSVutils.py b/modules/crawler/Utilities/CSV/CSVutils.py
index 1111ab3..81ab498 100644
--- a/modules/crawler/Utilities/CSV/CSVutils.py
+++ b/modules/crawler/Utilities/CSV/CSVutils.py
@@ -39,8 +39,8 @@ def export_data_to_csv(filename, data_dict):
     with open(PROCESSED_DATA_PATH + filename[12:], "w+") as file:
 
         for date in data_dict:
-            if len(date) != 10:
-                raise ValueError("Invalid date format for key value --> ddmmYYYYhh expected!")   
+            if len(date) != 13:
+                raise ValueError("Invalid date format for key value --> YYYY-mm-dd-hh expected!")   
             for data in data_dict[date]:
                 csv_line = data_dict[date][data]
                 if not isinstance(csv_line,CSVDataLine.CSVDataLine):
diff --git a/modules/crawler/Utilities/Database/DatabaseLoader.py b/modules/crawler/Utilities/Database/DatabaseLoader.py
index c86698f..4da105e 100644
--- a/modules/crawler/Utilities/Database/DatabaseLoader.py
+++ b/modules/crawler/Utilities/Database/DatabaseLoader.py
@@ -68,8 +68,8 @@ def get_data_from_file(filename, config):
         database_data_line = DatabaseDataLine.DatabaseDataLine(
             name, devices[name]["x"], devices[name]["y"], date, occurrence)
 
-        # if you want to change table split by hours or months change this
-        date_without_hours = date[:-2]
+        # if you want to change table split by hours or months change this YYYY-mm-hh-dd
+        date_without_hours = date[:-3]
         if date_without_hours not in date_dict:
             date_dict[date_without_hours] = list()
 
diff --git a/modules/crawler/Utilities/DateFormating.py b/modules/crawler/Utilities/DateFormating.py
index d7b8d9a..1ec11cf 100644
--- a/modules/crawler/Utilities/DateFormating.py
+++ b/modules/crawler/Utilities/DateFormating.py
@@ -5,7 +5,7 @@ def date_formatter(string_date):
         string_date: string containing date in format 22.08.2018 12:27:00
 
     Returns:
-        string of date in format 0804201814 ddmmYYYY
+        string of date in format YYYY-mm-dd-hh
     """
     if string_date[11].isspace():
         pos = 0
@@ -21,19 +21,19 @@ def date_formatter(string_date):
 
         string_date = srr
 
-    return_date = string_date[:2] + string_date[3:5] + string_date[6:10]
+    return_date = string_date[6:10] + '-' + string_date[3:5] + '-' + string_date[:2]
 
     return return_date
 
 
 def date_time_formatter(string_date):
     """
-    Converts one type of date format "dd.mm.yyyy hh.mm.ss" to date format ddmmYYYYhh
+    Converts one type of date format "dd.mm.yyyy hh.mm.ss" to date format YYYY-mm-dd-hh
     Args:
         string_date: string containing date in format 22.08.2018 12:27:00
 
     Returns:
-        string of date in format 0804201814 ddmmYYYYhh
+        string of date in format YYYY-mm-dd-hh
     """
     if string_date[11].isspace():
         pos = 0
@@ -49,6 +49,6 @@ def date_time_formatter(string_date):
 
         string_date = srr
 
-    return_date = string_date[:2] + string_date[3:5] + string_date[6:10] + string_date[11:13]
+    return_date = string_date[6:10] + '-' + string_date[3:5] + '-' + string_date[:2] + '-' + string_date[11:13]
 
     return return_date
