How to get datetime of n weekdays before today [duplicate]
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.
python
marked as duplicate by Wen-Ben
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.
add a comment |
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.
python
marked as duplicate by Wen-Ben
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
add a comment |
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.
python
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
python
asked Nov 26 '18 at 1:41
xxyaoxxyao
1017
1017
marked as duplicate by Wen-Ben
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
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
add a comment |
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
add a comment |
1 Answer
1
active
oldest
votes
Yeah I got it.pd.tseries.offsets.BDay(1)
works
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
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Yeah I got it.pd.tseries.offsets.BDay(1)
works
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
add a comment |
Yeah I got it.pd.tseries.offsets.BDay(1)
works
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
add a comment |
Yeah I got it.pd.tseries.offsets.BDay(1)
works
Yeah I got it.pd.tseries.offsets.BDay(1)
works
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
add a comment |
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
add a comment |
can you include an example?
– Henry Woody
Nov 26 '18 at 1:55