Index: /trunk/ippTools/src/pztool.c
===================================================================
--- /trunk/ippTools/src/pztool.c	(revision 30226)
+++ /trunk/ippTools/src/pztool.c	(revision 30227)
@@ -297,8 +297,10 @@
 
     psMetadata *where = psMetadataAlloc();
-    PXOPT_COPY_STR(config->args, where,  "-exp_name",     "exp_name", "==");
-    PXOPT_COPY_STR(config->args, where,  "-inst",         "camera", "==");
-    PXOPT_COPY_STR(config->args, where,  "-telescope",    "telescope", "==");
-    PXOPT_COPY_STR(config->args, where,  "-exp_type",     "exp_type", "==");
+    PXOPT_COPY_STR(config->args, where,  "-exp_name",      "exp_name",  "==");
+    PXOPT_COPY_STR(config->args, where,  "-inst",          "camera",    "==");
+    PXOPT_COPY_STR(config->args, where,  "-telescope",     "telescope", "==");
+    PXOPT_COPY_STR(config->args, where,  "-exp_type",      "exp_type",  "==");
+    PXOPT_COPY_TIME(config->args, where, "-dateobs_begin", "dateobs",   ">=");
+    PXOPT_COPY_TIME(config->args, where, "-dateobs_end",   "dateobs",   "<=");
 
     PXOPT_LOOKUP_BOOL(desc, config->args, "-desc", false);
@@ -328,5 +330,5 @@
 
         if (psListLength(where->list)) {
-            psString whereClause = psDBGenerateWhereConditionSQL(where, "pzDownloadImfile");
+            psString whereClause = psDBGenerateWhereConditionSQL(where, NULL);
             psStringAppend(&query, " AND %s", whereClause);
             psFree(whereClause);
Index: /trunk/ippTools/src/pztoolConfig.c
===================================================================
--- /trunk/ippTools/src/pztoolConfig.c	(revision 30226)
+++ /trunk/ippTools/src/pztoolConfig.c	(revision 30227)
@@ -76,4 +76,6 @@
     psMetadataAddStr(pendingimfileArgs, PS_LIST_TAIL, "-inst", 0,            "define camera ID", NULL);
     psMetadataAddStr(pendingimfileArgs, PS_LIST_TAIL, "-telescope", 0,            "define telescope ID", NULL);
+    psMetadataAddTime(pendingimfileArgs, PS_LIST_TAIL, "-dateobs_begin", 0,  "search for exposures by time (>=)", NULL);
+    psMetadataAddTime(pendingimfileArgs, PS_LIST_TAIL, "-dateobs_end", 0,  "search for exposures by time (<=)", NULL);
     psMetadataAddStr(pendingimfileArgs, PS_LIST_TAIL, "-exp_type", 0,            "define exposure type", NULL);
     psMetadataAddBool(pendingimfileArgs, PS_LIST_TAIL, "-desc", 0,            "sort ouput in descending format", false);
