Changing date format in graphs

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator

CecileBF
Posts: 11
Joined: Mon Mar 27, 2023 8:54 am

Changing date format in graphs

Postby CecileBF » Tue Oct 10, 2023 12:40 am

Hi,
I use floating text to indicate my last point on subtitles of graph.
Basically, here are typical lines I would write:
{%g}.addtext(t,font(calibri,14,b)) "Dette privée (% de PIB mondial)"
{%g}.addtext(1.80, -0.32,font(calibri,12), keep) Source: BRI, dernier point: {%last}
%last referring to a date.
But the date appears on the graph automatically with the format mm/dd/yyyy and I would prefer to have it with the format dd/mm/yyyy (French usual presentation for dates).
How would it be possible?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13323
Joined: Tue Sep 16, 2008 5:38 pm

Re: Changing date format in graphs

Postby EViews Gareth » Tue Oct 10, 2023 9:12 am

if %last is a string created by you, when you create the string use a different format.
Follow us on Twitter @IHSEViews

CecileBF
Posts: 11
Joined: Mon Mar 27, 2023 8:54 am

Re: Changing date format in graphs

Postby CecileBF » Wed Oct 11, 2023 8:43 am

Can you help me do this?

Here are the typical lines I write before to determine the most recent date (which I then report in the graph's title) of at least one of the series on the graph:
%seriesdugraph="eme_detteprivee adv_detteprivee dettetotale"
group seriesgraph {%seriesdugraph}
series datemax=@rilast(seriesgraph)
%last=datemax.@last
I wish %last to have the format "DD-MM-YYYY" instead of MM/DD/YYYY when I plot it in the title.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13323
Joined: Tue Sep 16, 2008 5:38 pm

Re: Changing date format in graphs

Postby EViews Gareth » Wed Oct 11, 2023 8:52 am

Easiest way for you is Options->General Options->Date Representation.
Follow us on Twitter @IHSEViews

CecileBF
Posts: 11
Joined: Mon Mar 27, 2023 8:54 am

Re: Changing date format in graphs

Postby CecileBF » Tue Oct 17, 2023 2:39 am

Thank you, it is very helpful! By the way, is there a way to code this option (for interoperability of programs with my colleagues)?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13323
Joined: Tue Sep 16, 2008 5:38 pm

Re: Changing date format in graphs

Postby EViews Gareth » Tue Oct 17, 2023 8:46 am

Unfortunately not, other than temporarily via optset
Follow us on Twitter @IHSEViews


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 12 guests