On 23 May 2016 at 21:21, Richard Duivenvoorde <[email protected]> wrote: > Nyall Dawson schreef op 2016-05-23 11:41: >>> >>> But now it would be cool to check the time-difference between those two >>> (called timespan?). >>> I did not find a function for those... >> >> >> Use the age() function. That takes two datetimes and returns an >> interval length between them. You can extract the >> seconds/minutes/hours/etc from an interval type using the seconds(), >> minutes(), ... etc functions. >> >> Hope that helps! > > > Ah :-) definitely... Did find see that one...
FYI - as of https://github.com/qgis/QGIS/commit/8ddcf76 you can now just directly calculate date/time/datetime differences using "-", eg to_date('2016-03-04')-to_date('2016-03-01') This will return an interval object which you can then use seconds(), minute(), etc on. Nyall > > Thanks! > > Richard _______________________________________________ Qgis-developer mailing list [email protected] List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
