Team,

I have date1 and date2 fields. I am able to calculate number of days
between the two dates using relativedelta as shown below:

date1 = datetime.datetime.strptime(str(end_date), '%Y-%m-%d')
date2 = datetime.datetime.strptime(str(start_date), '%Y-%m-%d')
r = relativedelta.relativedelta(date1, date2)
n_days=r.days
What I want now is calculating the days but excluding weekends days. Again
I want to pick the second date and get the number of days (date2-date1) in
the text field directly.

Please help.

Thanks
-- 
*Eugene*

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CABxpZHuFQeYBCNXy1F3Q5S%3DpxmWX_YyR2sYL2A%3DST-2QEBdb7w%40mail.gmail.com.

Reply via email to