I'm having a few problems with dates and FMDB. I have a whole bunch of records with datetime values in them which I want to group by date/hour etc. Using a basic sqllite query tool, I have determined the correct sql syntax to use:
The above works and the returned data is correct. However, when i try and execute the same using the FMDB wrapper, my result does not return the correct results. Any fields returned when using the datetime() function reads as NULL when i print it out to the console. Also, the query is not executing correctly either since only 1 record is returned, i know this is incorrect since i can execute the same query using my sqllite tools which returns the correct results.
Can anyone help me work out what I need to do? i only downloaded the FMDB lib a few weeks ago so should have a relatively recent version.
Code:
select strftime('%Y-%m-%d',datetime('2001-01-01',zentrydate || 'seconds','localtime')) as dteEntry...
The above works and the returned data is correct. However, when i try and execute the same using the FMDB wrapper, my result does not return the correct results. Any fields returned when using the datetime() function reads as NULL when i print it out to the console. Also, the query is not executing correctly either since only 1 record is returned, i know this is incorrect since i can execute the same query using my sqllite tools which returns the correct results.
Can anyone help me work out what I need to do? i only downloaded the FMDB lib a few weeks ago so should have a relatively recent version.