Page 1 of 1

Changing date format in graphs

Posted: Tue Oct 10, 2023 12:40 am
by CecileBF
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?

Re: Changing date format in graphs

Posted: Tue Oct 10, 2023 9:12 am
by EViews Gareth
if %last is a string created by you, when you create the string use a different format.

Re: Changing date format in graphs

Posted: Wed Oct 11, 2023 8:43 am
by CecileBF
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.

Re: Changing date format in graphs

Posted: Wed Oct 11, 2023 8:52 am
by EViews Gareth
Easiest way for you is Options->General Options->Date Representation.

Re: Changing date format in graphs

Posted: Tue Oct 17, 2023 2:39 am
by CecileBF
Thank you, it is very helpful! By the way, is there a way to code this option (for interoperability of programs with my colleagues)?

Re: Changing date format in graphs

Posted: Tue Oct 17, 2023 8:46 am
by EViews Gareth
Unfortunately not, other than temporarily via optset