hello,
I want to get a string month from a number, so I wonder If there is a function which transforms a number to a string of the month corresponding to the number I give in input, for example if I give 3 it will gives me Mars...etc but I want it just for the month, not for the hole date. Can you help me please ?
how to get a string of a month from a scalar
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: how to get a string of a month from a scalar
I am sure there is an easier way, but I am drawing blank at the moment, so this rough idea will have to do.
You can use @datestr to convert a date number into a string, including just the month part.
The trick is going to be getting a date number from your "3".
You could start with the date value associated with the date "01/01/2016", then use the @dateadd function to add months to it to end up with a valid date number to use.
You can use @datestr to convert a date number into a string, including just the month part.
The trick is going to be getting a date number from your "3".
You could start with the date value associated with the date "01/01/2016", then use the @dateadd function to add months to it to end up with a valid date number to use.
Re: how to get a string of a month from a scalar
Thank you very much! It worked well :D
Who is online
Users browsing this forum: No registered users and 2 guests
