
Other users who have found the question cross-posted are encouraged to share the links as a reply as well. If you've asked a question, let people know where else you asked the question and what your solution(s) were! When you post a question on another platform, include those links in your questions or as a reply (if it's Discord, just mention it).

Xline stata date format how to#
See the sticked "READ ME: How to best ask for help in /r/Stata" post on how to comment here if all else fails. Description These functions convert dates and times recorded as strings to Stata dates. Make sure to include the word "Stata" in your search query. Perform a web search for your question prior to posting here. Stata's online community has been active for many years and many questions and solutions are documented on StataList, which are highly indexed on contemporary search engines (e.g., Google). Stata has extensive and complete documentation you can read before posting here (and you can type help followed by the command name in console to see it, e.g. This is not a place to find Stata tutoring. Do not request that the /r/Stata community do your homework for you. Assume good faith questions and comments. Be nice when posting or commenting to a post.The Dutch version looks similar: TEKST (A1 dd-mm-jj) Afterwards you still have to copy and the paste as values to get workable dates for Datastream.
Xline stata date format code#

None are shown here, but the syntax is just an extension of that given.Īxis titles If the time (usually x) axis is adequately explained, that axis title is redundant and even dopey if it is some arbitrary variable name. Grid lines Lines demarcating years could be worth adding. Hi Stata users, I want to make a twoway bar graph that plots a number (on the y axis) against a date (on the x axis). Ticks Put ticks as the ends (equivalently beginnings) of time intervals. You can suppress a tick by setting its length to zero or its colour to invisible. Labels Put informative labels in the middle of time intervals.

The main ideas are blindingly obvious once spelled out: It's a little bit of work but no more than use of standard and documented label and tick options. I want to manipulate the length, label and ticks of the x-axis. The good news is that you need just to build on what you have and put labels and ticks on your x axis. 1 Manipulate x-axis in twoway graph with dates, 14:45 Hi Stata users, I want to make a twoway bar graph that plots a number (on the y axis) against a date (on the x axis). See much detailed discussion at references turned up by search week, sj. You are lucky that you have no 53 week years in your data otherwise you would get some bizarre results. These are documented rules, and they do not match your data. Later weeks start 7 days later in turn, except that week 52 is always 8 or 9 days long. You should only use Stata's weekly date functions if your weeks satisfy Stata's rules: The fact that you have weekly data is only a distraction here.
