Question

I'm working with a sqlite database. I use a program which stores logs to this db file, but through the program my options for querying the log are not as powerful as with SQL commands, so I decided to take a crack at these from a sqlite prompt.

The problem is that I want to be able to reliably do an order by on the date/time (as well as interpret/convert the date/time), which is where I'm stuck. I cant seem to figure out what format this timestamp is in. The data type is double. I would attach a sample screenshot but I'm a new user, so here is a sample of the data from this column:

2456741.27084534
2456741.27084536
2456741.27084573
2456741.27084687
2456741.27085065
2456741.27085304
2456741.27091975
2456741.99734168
2456742.02757318
2456742.08334318
2456742.08334415
2456742.08334426
2456742.08334727
2456742.08334733
2456742.0833491

The value on the left increments by one with each new calendar day, and that is about as far as I've gotten. Any and all tips appreciated, please let me know if there's any more info I should provide.

-escuelle

Was it helpful?

Solution

This time string follows the format: DDDD.DDDD. This is the julian day number expressed as a floating point value.

Read more about the time strings of sqlitehere

Confirm the calendar dates here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top