WebDev, QueryTagHistory and export to CSV problem since upgrade

Hi all,
So we have a long running system utilizing the WebDev module that basically does a QueryTagHistory, gets the dataset, and converts it to CSV for consumption by another system.
Since the system was upgraded from 7.9.10 to 7.9.13 the export to CSV is appending the milliseconds to the TimeStamp column. This was not the case on any previous version and it caused a major hiccup in the other systems import routines.

I have tried using the localized=True and setting the servers date/time format to exclude the milliseconds but it doesn’t make a difference. I have a hack in place where I have to loop the resulting dataset and change the value of the timestamp column but it adds time to the entire transaction. Was something changed in the dataset.toCSV function to cause this? Can I undo it without rolling the entire system version back?

Does anyone have an efficient way to remove the milliseconds?

Sounds like the default conversion for java.sql.Timestamp, a subclass of java.util.Date, that happens to be the default class that datetime columns deliver from most databases. I wouldn’t expect to be able to undo this.

Yeah it just sucks since it didn’t include the milliseconds on previous versions.

It’s an unfortunate tradeoff - the default for export CSV was losing millisecond precision, which caused issues for other customers.
You could use system.dataset.formatDates to do the operation you’re already doing in bulk - it’ll probably be a bit faster, too.

:flushed: :astonished:
Wow that is embarrassing that I never even noticed that function...
Speed is back where it belongs. Thanks!

2 Likes

They do like to sneak them in on us. :slight_smile:

1 Like