I'm working with the data sets which are 1 month lag. For example, it's now May, but today the data provider sends a data set whose name is like this "data_202304.csv"
I'm trying to automate the data importing step but don't know how to get the lagged month. If it's the current month, say, the file name is "data_202305.csv" then I can do:
How can I get around this issue?
I'm trying to automate the data importing step but don't know how to get the lagged month. If it's the current month, say, the file name is "data_202305.csv" then I can do:
Code:
local current_month : di %tdN daily("$S_DATE", "DMY") import delimited "path\data_2023`current_month'.csv", clear
Comment