Skip to content

date() function not working? #385

@BloodyRain2k

Description

@BloodyRain2k

I've just spent a few days trying to filter my Android Sqlite db for entries made on a certain day and NOTHING worked.

I tried feeding it iso dates (yyyy-mm-dd hh:mm:ss) as string, blank (threw errors obviously), with the "date()" function and returned anything usable.

So after a while I started concentrating on the date function itself and found out that, for me at least, it doesn't work at all.

date('now') returns 0001-01-01 00:00:00 and so does everything else I fed it, even ticks as strings and numbers. I have not managed to make this function return ANYTHING other than the 1st Jan of the year 1....

Could someone please look into this and check if I just used it wrong for some reason, even though I went through dozen Sqlite docs, or if it's really broken.

With the setting "storeDateTimeAsTicks" being true by default, it's be neccessary that this function works.

The only way I got my personal case working was by turning it off which finally allowed me to successfully use 'select' with 'between' which was impossible before.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions