convert range of date from julian to gregorian date

9 views
Skip to first unread message

sum abiut

unread,
Apr 26, 2018, 12:16:42 AM4/26/18
to django...@googlegroups.com
Hi ,
I am trying to convert a range of date from julian to gregorian date
 
here is what i have try
stmt=stmt.where(and_(rate.columns.journal_ctrl_num==fund.columns.journal_ctrl_num,fund.columns.account_code==selected_acc,rate.columns.date_entered.between(convert,convert1)))
result_proxy=connection.execute(stmt).fetchall()
            for a in result_proxy:
                test=datetime.date.fromordinal(int(a.date_entered))

the two date ranges  are (convert and convert1)

but when i pass test parameter  to the template it only display the start date which is convert. I was wondering how to pass to date range to the date_applied in      test=datetime.date.fromordinal(int(a.date_entered))

i know from sql its done like this rate.columns.date_entered.between(convert,convert1)




cheers
Reply all
Reply to author
Forward
0 new messages