Nancy Andeyo <nandey...@gmail.com> writes: > the filter *.filter(func.strftime('%m', func.date(Events.date_of_event) == > datetime.today().strftime('%m')))* to get all the events that happened in > the current month is not working. But displays all the events.
Read carefully what you have written: > func.strftime('%m', func.date(Events.date_of_event) == > datetime.today().strftime('%m')) You are passing a boolean value to the strftime() function, and that's not what you probably meant/want. ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. l...@metapensiero.it | -- Fortunato Depero, 1929. -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description. --- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sqlalchemy/87ttxueubh.fsf%40metapensiero.it.