diff --git a/apimanager/metrics/templates/metrics/api.html b/apimanager/metrics/templates/metrics/api.html
index b335207c..b4ac7132 100644
--- a/apimanager/metrics/templates/metrics/api.html
+++ b/apimanager/metrics/templates/metrics/api.html
@@ -170,7 +170,7 @@
{% trans "Filter" %}
{{ metric.url }} |
{{ metric.source_ip}} |
{{ metric.target_ip }} |
- {{ metric.date|date:"Y-m-d H:i:s.u" }} |
+ {{ metric.date}} |
{{ metric.duration }} |
diff --git a/apimanager/metrics/views.py b/apimanager/metrics/views.py
index c697acfc..d8413846 100644
--- a/apimanager/metrics/views.py
+++ b/apimanager/metrics/views.py
@@ -115,7 +115,7 @@ def to_django(self, metrics):
"""
for metric in metrics:
metric['date'] = datetime.datetime.strptime(
- metric['date'], settings.API_DATE_FORMAT_WITH_SECONDS )
+ metric['date'], settings.API_DATE_FORMAT_WITH_MILLISECONDS).isoformat(timespec='milliseconds')
return metrics
def to_api(self, cleaned_data):