Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: creating a custom monthly date

From   Francesco <>
Subject   st: creating a custom monthly date
Date   Sat, 21 Apr 2012 14:56:57 +0200

Dear Statalist,

I have a little problem about the creation a custom date in Stata 12.

Let me specify what I would like to do : I have a panel dataset with
daily observations (which may contains multiple identical dates for
the same id)
I already know how to obtain the relevant month for each daily date,
by typing -gen month=mofd(daily_date).

However, please do not ask me why, I absolutely need to create a
"custom" month variable that starts 2 days before the end of the
previous month (in terms of working days) and ends 3 days before the
start of the next month... I need a way to do that which I can
reproduce accross different datasets, thus obtaining the same custom
dates (for a merging purpose)...

What do you think?
Could you help me ?

Many thanks
*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index