This may be a basic question, but is there a straightforward way to calculate the number of days that overlap between two date ranges?
An example of what I'm looking for is the Overlap variable below:
Event1_start Event1_end Event2_start Event2_end Overlap
01mar2020 30mar2020 15feb2020 5mar2020 5
01mar2020 30mar2020 01feb2020 29feb2020 0
Thanks so much for your help!
Related Posts with Days overlap in two date ranges
Updating stata journal packages and ssc (the parallel module)Hi all, Recently I realized that the parallel module, which I maintain, has not been updated in SSC…
How can I use Stata to plot a graph like this?Dear all, Can I use Stata to plot a graph to visualize the treatment statuses of each observation in…
Problems with collect layoutHi all, I aim at creating a table that reports the mean of credit_rationed1 (namely, the % of credi…
60 month rolling sd of returnsHey there, I have a problem with the rolling sd. I have monthly return data and need to construct a…
Looping increasing cellranges and importing to stataHi everyone ı deeply searched about my problem but ı couldnt find a solution. Here is my problem abo…
Subscribe to:
Post Comments (Atom)
0 Response to Days overlap in two date ranges
Post a Comment