diff --git a/import_into_DB.sh b/import_into_DB.sh
index 4e6ca12b4e4770fa11e5f8d5b40741656c21f7e0..da2d9e2edb88296fa5136a60c8960203880d96b7 100644
--- a/import_into_DB.sh
+++ b/import_into_DB.sh
@@ -126,11 +126,10 @@ set started = substr(
 -- duration
 update tasks 
 set duration =substr(
-	substr(output, 
-		1, 
-		instr(output, ' seconds')-1),
-	-20);
--- set duration = replace(replace(output, ' seconds', ''), '... used ', '');
+	output, 
+	instr(output, 'dbqueries'||char(10)) + 19, 
+	instr(output, 'seconds'||char(10)) - instr(output, 'dbqueries'||char(10)) - 19
+	);
 update tasks
 set duration = null
 where not output like '%second%';