I am using format in Stata 15.1 on macOS 11.5.1. I have a variable called yrmo that represents year and month. The variable is stored numerically as a monthly date. (For example, April 2021 is stored as 735.)
I'm trying to display the variable in the following format:
Apr ’21
(note curly apostrophe / single right quote mark)
I tried the following command, including an exclamation point to enable me to specify any character and then a curly quote mark:
but got an error:
I did not get an error when using a straight quote mark:
works fine and yields Apr '21.
Is it possible to include a curly quote mark in a datetime display format? If so, how?
Thanks.
P.S. Other curly quote marks such as ‘ and “ and ” also cause errors, although the straight double quote " and the backtick ` do not. Maybe it's an ASCII thing?
I'm trying to display the variable in the following format:
Apr ’21
(note curly apostrophe / single right quote mark)
I tried the following command, including an exclamation point to enable me to specify any character and then a curly quote mark:
Code:
format yrmo %tmMon_!’YY
Code:
invalid %format r(120);
Code:
format yrmo %tmMon_!'YY
Is it possible to include a curly quote mark in a datetime display format? If so, how?
Thanks.
P.S. Other curly quote marks such as ‘ and “ and ” also cause errors, although the straight double quote " and the backtick ` do not. Maybe it's an ASCII thing?
Comment