Bex wrote:Yes that was our solution!

Magic Nodes had this from v1.6.

If i use 2415019.0 then I get a mismatch with 12 hours

If i use 2415018.5 then I get it right.

It depends from situations and how you consider a full day. For example, let say that I add a track in 10 AM today. When will I get one day since added: tomorrow in 00:00 or in 10 AM? Or maybe one day after tomorrow in 00:00? Same question could be asked for your Last week and Last month (but not for Previous week and Previous month). I consider that a full day is from 00:00 until next day in 00:00, so for me one day since added is one day after tomorrow from 00:00. Your script calculates full day from one point in time to this time + 24:00, e.g. in previous example it is tomorrow from 10 AM. But never mind, forget about this - it is questionable if my approach is anything better. Maybe I will return my calculations to 2415018.5.

BTW, I know this goes from this topic, but I think you have an error in PlayHistory3.6.1 script in the the line 867: instead of cbxPrevMonth I suppose it should be cbxPrevWeek.

Also, you have too many Casts to intiger, instead of integer. I am wondering how SQLite works with that - you could type a Cast to anything, it don't have error checking for this at all.