Index: trunk/ippTools/src/pxinject.c
===================================================================
--- trunk/ippTools/src/pxinject.c	(revision 9464)
+++ trunk/ippTools/src/pxinject.c	(revision 10039)
@@ -128,5 +128,25 @@
     }
 
-    if (!newExpInsert(config->dbh, exp_tag, exp_id, camera, telescope, exp_type, imfiles)) {
+    psTime *dateobs = NULL;
+    {
+        psString dateobsStr = psMetadataLookupStr(&status, config->args, "-dateobs");
+        if (!status) {
+            psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -dateobs");
+            return false;
+        }
+        dateobs = psTimeFromISO(dateobsStr, PS_TIME_UTC);
+    }
+
+
+    if (!newExpInsert(config->dbh,
+                (psU64)atoll(exp_tag),
+                exp_id,
+                camera,
+                telescope,
+                dateobs,
+                exp_type,
+                imfiles
+            )
+        ) {
         psError(PS_ERR_UNKNOWN, false, "database error");
         return false;
