I need to match on a date using the LIKE operator. The date should be in current user's local format, not in the general format.
So I use the strftime function like this:
WHERE strftime('%d.%m.%Y %H:%M', createdDate, 'localtime') LIKE '%{searchTerm}%'
Unfortunately this works only for fixed format '%d.%m.%Y %H:%M'. But I want to use the user's current locale format.
So I need to either: 1) Get the strftime format string from a C++ locale object 2) Make SQLite format the date using current locale itself
Spent already several hours on this to no avail. Would be grateful if anyone would point me in the right direction on how to tackle this problem.
Example: Given current locale is German I want to get something like "%d.%m.%Y %H:%m". For an US locale I want to get "%m/%d/%Y %H:%m"