Index: /trunk/Mars/mbase/MTime.cc
===================================================================
--- /trunk/Mars/mbase/MTime.cc	(revision 12796)
+++ /trunk/Mars/mbase/MTime.cc	(revision 12797)
@@ -420,12 +420,17 @@
 //   "yyyy-mm-dd hh:mm:ss"
 //
-Bool_t MTime::SetSqlDateTime(const char *str)
-{
-    if (!str)
+Bool_t MTime::SetSqlDateTime(TString str)
+{
+    if (str.IsNull())
         return kFALSE;
 
+    str.ReplaceAll("T", "");
+
+    if (str.Contains('.'))
+        str += "000";
+
     UInt_t  y, mon, d, h, m, s, ms;
 
-    if (7==sscanf(str, "%04u-%02u-%02u %02u:%02u:%02u.%u", &y, &mon, &d, &h, &m, &s, &ms))
+    if (7==sscanf(str, "%04u-%02u-%02u %02u:%02u:%02u.%03u", &y, &mon, &d, &h, &m, &s, &ms))
         return Set(y, mon, d, h, m, s, ms);
 
Index: /trunk/Mars/mbase/MTime.h
===================================================================
--- /trunk/Mars/mbase/MTime.h	(revision 12796)
+++ /trunk/Mars/mbase/MTime.h	(revision 12797)
@@ -94,5 +94,5 @@
     void     Set(const struct timeval &tv);
     Bool_t   SetString(const char *str);
-    Bool_t   SetSqlDateTime(const char *str);
+    Bool_t   SetSqlDateTime(TString str);
     Bool_t   SetSqlTimeStamp(const char *str);
     void     SetCT1Time(UInt_t mjd, UInt_t t1, UInt_t t0);
