ios - Fetching results the current day & all years? -


I have read through several posts and have tried many different things but I think it seems Works for nothing can be found as it should be simple that I am missing it!

I have a detailed list of names and birthdays. Changed from Json to sqlite. I am trying to get all the results of the current day (i.e. all birthdays that happened in my database on March 20). I believe I am looking for a bill to use in my fetchedresultscontroller.

Is this possible? Thank you.

If birthdays are stored in the database as NSDate So I do not know an easy solution.

But for birthday, maybe it makes more sense to store it as three characteristics "year", "month", "day". (NSDT is an absolute point of time, which can occur on March 19th in a part of the world and on March 19 in a different part of the world.)

If you do this, then you are simple You can use

  int theMonth = 3; Int theDay = 20; NSPredicate * predicate = [NSPredicate predicateWithFormat: @ "months =% d and day =% d", month, the day]    

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -