Issues with dates and timestamps in Specify 7 query

We have started using the labels that can be produced from within Specify for our cryptogam packets at the end of last year. While in test, this worked exceptionally well in Specify 7, but now that it is in production, we encounter some issues, and differences with Specify 6, with how timestamps and dates are handled in the Specify 7 query.

People here like to print packets in the order they have databased the specimens, so that it is easy matching up the specimen with the packet it needs to go in. So, we order the results of the label query by the TimestampCreated of the Collection Object. This works fine in Specify 6:

image

but in Specify 7 the time part is stripped off the timestamp, so specimens that have been databased on the same day will come out in pretty much random order:

We generally print batches of 50 to 100 packets, so, if they are not in the right order, it makes for a much more time-consuming job to match up the packets and the specimens.

Another thing I noticed just this morning is that the Specify 7 query does not take the date precision in account when calculating Month and Day values. So, for a record with an eventDate of just ‘1876’, Specify 6 gives:

and Specify 7 gives:

I only use the Day and Month fields because I thought I could not access the DatePrecision in the query and it turns out that I was wrong, so I can probably fix this myself. However, I thought I’d note the discrepancy between Specify 6 and 7. People might rely on the Month and/or Day fields to be blank to know that they are dealing with an incomplete date.

I hope these issues are reasonably easy to fix.

Hi @NielsKlazenga,

Thanks for your post!

You’ve identified two areas of in need of improvement. To start, it is a known issue that ‘Timestamp’ fields do not return the time in addition to the date in Specify 7. This is part of a larger problem where Specify 7 does not support “time” functionality.

The second issue is a great point and something that we had not previously considered to my knowledge.

In the database, Specify stores the dates as 1/1/YYYY when only the year is known and indicated to Specify 6 that the 1s should be ignored based on the DateFieldPrecision value (for precise dates). Specify 7 has not had this logic implemented, therefore you are seeing the issue you described:

I think you’re absolutely right that some users may rely on the month and/or day fields being blank for their queries, reports, labels, etc.

Thank you again for taking the time to share these points with us! I hope these are relatively easy to solve as well.