i’m facing a little complication in this logic please help me out….
so the thing is:
i have a list of times in a table like
9:00 am, 9:30 am, 10:00 am, 10:30 am, 11:00 am, 11:30 am, 12:00 pm, 12:30 pm, 1:00pm, 1:30 pm………..
so now if i have given a random time like 10:42 am the logic should be in such a way that it should return 10:30 am
please help me out with this logic……..
it helps alot if it is sql-statement…
any help is very appreciated . . . . .
Thank you
First, get rid of your
am / pmqualifiers – use the 24 hour clock. Better yet, just use seconds or minutes since midnight.If you’ve done that, you can then just use:
That’s actually MySQL syntax, but it should be easy to port to SQLite.