Question: I am trying to count events that happen in a day, which in itself is easy:

```
SELECT date(time),COUNT(DISTINCT comment)
FROM data
GROUP BY date(time)

```

But I need a day end to be set at 4pm. So all comments before 4pm is day N, and news after 4pm are day N+1. This isnt a global thing, so I'd rather not change time zone of entire program and etc. Maybe I can somehow apply timezone to this query or pad time?

Answer: 
Use `list` on a number converted to string:

```
In [1]: [int(x) for x in list(str(123))]
Out[2]: [1, 2, 3]

```
### you can use:

First convert the value in a string to iterate it, Them each value can be convert to a Integer `value = 12345`

`l = [ int(item) for item in str(value) ]`