We have several 'time-aware' datasets, but the dates are stored as YEAR (2017), SCHOOLYEAR (20172018), etc. rather than a true DATETIME value.
In order to animate these datasets, is it possible to create a dummy DATETIME value using a virtual field in QGIS?
I've tried so far to create a virtual field using the following expression:
to_datetime(LEFT("SCHOOLYEAR",4) || '-' || '10' || '-' || '01')
Which looks correct:
...though in the attribute table there is an added T - which might be acceptable based on the formats I get in the error below...
But when I apply the layer to the timemanager, I get this error:
Any thoughts on what format / expression I should be using given my inputs?
Answer
It took me some time to reproduce the error, sorry...
The error (upper right) came from wrong choice of the Start time
(hence also End time
). in the Time manager's Settings. We have to select DATETIME field. It can be either Date, Datetime, Text(string) types (as far as the format is acceptable to Time manager).
Your original data as shown in your question should work fine, too.
No comments:
Post a Comment