How to get datetime of n weekdays before today [duplicate]












-2
















This question already has an answer here:




  • Add n business days to a given date ignoring holidays and weekends in python

    8 answers




I want to get the datetime of N weekdays before today. Which function can help me to realize it? I try my best to search it but doesn't work.










share|improve this question













marked as duplicate by Wen-Ben python
Users with the  python badge can single-handedly close python questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 26 '18 at 1:55


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.



















  • can you include an example?

    – Henry Woody
    Nov 26 '18 at 1:55
















-2
















This question already has an answer here:




  • Add n business days to a given date ignoring holidays and weekends in python

    8 answers




I want to get the datetime of N weekdays before today. Which function can help me to realize it? I try my best to search it but doesn't work.










share|improve this question













marked as duplicate by Wen-Ben python
Users with the  python badge can single-handedly close python questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 26 '18 at 1:55


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.



















  • can you include an example?

    – Henry Woody
    Nov 26 '18 at 1:55














-2












-2








-2









This question already has an answer here:




  • Add n business days to a given date ignoring holidays and weekends in python

    8 answers




I want to get the datetime of N weekdays before today. Which function can help me to realize it? I try my best to search it but doesn't work.










share|improve this question















This question already has an answer here:




  • Add n business days to a given date ignoring holidays and weekends in python

    8 answers




I want to get the datetime of N weekdays before today. Which function can help me to realize it? I try my best to search it but doesn't work.





This question already has an answer here:




  • Add n business days to a given date ignoring holidays and weekends in python

    8 answers








python






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 26 '18 at 1:41









xxyaoxxyao

1017




1017




marked as duplicate by Wen-Ben python
Users with the  python badge can single-handedly close python questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 26 '18 at 1:55


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









marked as duplicate by Wen-Ben python
Users with the  python badge can single-handedly close python questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 26 '18 at 1:55


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.















  • can you include an example?

    – Henry Woody
    Nov 26 '18 at 1:55



















  • can you include an example?

    – Henry Woody
    Nov 26 '18 at 1:55

















can you include an example?

– Henry Woody
Nov 26 '18 at 1:55





can you include an example?

– Henry Woody
Nov 26 '18 at 1:55












1 Answer
1






active

oldest

votes


















0














Yeah I got it.pd.tseries.offsets.BDay(1) works






share|improve this answer
























  • If you mention pandas you can add the pandas tag with the question

    – Wen-Ben
    Nov 26 '18 at 1:55











  • OK, thank you for reminding.

    – xxyao
    Nov 26 '18 at 1:57


















1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














Yeah I got it.pd.tseries.offsets.BDay(1) works






share|improve this answer
























  • If you mention pandas you can add the pandas tag with the question

    – Wen-Ben
    Nov 26 '18 at 1:55











  • OK, thank you for reminding.

    – xxyao
    Nov 26 '18 at 1:57
















0














Yeah I got it.pd.tseries.offsets.BDay(1) works






share|improve this answer
























  • If you mention pandas you can add the pandas tag with the question

    – Wen-Ben
    Nov 26 '18 at 1:55











  • OK, thank you for reminding.

    – xxyao
    Nov 26 '18 at 1:57














0












0








0







Yeah I got it.pd.tseries.offsets.BDay(1) works






share|improve this answer













Yeah I got it.pd.tseries.offsets.BDay(1) works







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 26 '18 at 1:53









xxyaoxxyao

1017




1017













  • If you mention pandas you can add the pandas tag with the question

    – Wen-Ben
    Nov 26 '18 at 1:55











  • OK, thank you for reminding.

    – xxyao
    Nov 26 '18 at 1:57



















  • If you mention pandas you can add the pandas tag with the question

    – Wen-Ben
    Nov 26 '18 at 1:55











  • OK, thank you for reminding.

    – xxyao
    Nov 26 '18 at 1:57

















If you mention pandas you can add the pandas tag with the question

– Wen-Ben
Nov 26 '18 at 1:55





If you mention pandas you can add the pandas tag with the question

– Wen-Ben
Nov 26 '18 at 1:55













OK, thank you for reminding.

– xxyao
Nov 26 '18 at 1:57





OK, thank you for reminding.

– xxyao
Nov 26 '18 at 1:57



Popular posts from this blog

Contact image not getting when fetch all contact list from iPhone by CNContact

count number of partitions of a set with n elements into k subsets

A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks