Hi everyone, I am trying to retrieve deceased persons who died in the 
current month but the output gives no result. Here is my code with query 
done in Python Flask:
from datetime import datetime                                      from 
sqlalchemy import func                              
@app.route('/user/<username>')                            @login_required  
                                                   def user(username):   
 current_month = datetime.today().date().strftime("%B")              
 monthly_anniversaries =                                                  
 current_user.followed_deaths().filter(Deceased.burial_cremation_dat  e    
  <datetime.today().date()).filter(func.strftime('%B',Deceased.date_o  
f_death== current_month)).order_by(Deceased.timestamp.desc())      return 
render_template("user.html", monthly_anniversaries    
 =monthly_anniversaries)

-- 
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/3b972e00-e172-402a-983d-30ef7e22aef7n%40googlegroups.com.

Reply via email to