Index: trunk/MagicSoft/Mars/datacenter/macros/buildsequenceentries.C
===================================================================
--- trunk/MagicSoft/Mars/datacenter/macros/buildsequenceentries.C	(revision 8965)
+++ trunk/MagicSoft/Mars/datacenter/macros/buildsequenceentries.C	(revision 8968)
@@ -282,8 +282,11 @@
         // ========== Request number of events ==========
 
+        // Can be replaced by
+
         const TString runtime =
-            "SUM(if(TIME_TO_SEC(fRunStop)-TIME_TO_SEC(fRunStart)<0,"
-            " TIME_TO_SEC(fRunStop)-TIME_TO_SEC(fRunStart)+24*60*60,"
-            " TIME_TO_SEC(fRunStop)-TIME_TO_SEC(fRunStart))), ";
+            "SUM(TIME_TO_SEC(TIMEDIFF(fRunStop,fRunStart))), ";
+            //"SUM(if(TIME_TO_SEC(fRunStop)-TIME_TO_SEC(fRunStart)<0,"
+            //" TIME_TO_SEC(fRunStop)-TIME_TO_SEC(fRunStart)+24*60*60,"
+            //" TIME_TO_SEC(fRunStop)-TIME_TO_SEC(fRunStart))), ";
 
         const TString where = Form("(fRunNumber BETWEEN %d AND %d) AND fExcludedFDAKEY=1",
