SQLite Forum

How do I access urls in a sqlite database using timedelta?
Login
How do you suppose SQLite would know what "past_time2" and "past_time" are?

To understand what I mean - Try that same code but change the execute line to:  
```
c.execute('SELECT "past_time2", "past_time"')
```
Does that work as expected? (i.e. showing dates in stead of words?)

If not, then try the following:

Not sure what language that is (looks C#-ish but without statement terminators), so I do not know what the string concatenation character or quote-escape characters are for your language, but assuming it's "+" and doubled quotes (''), try this code:
```
c.execute('SELECT adUrl FROM donedeal_listings WHERE timestamp BETWEEN '''+past_time2+''' AND '''+past_time+'''')
```

If that doesn't help, please say what your OS, Language platform and SQLite connectors are.


Good luck,
Ryan