Adding new formats for date variables?

DataGraph Forums Technical Support Support Desk Adding new formats for date variables?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #8284
    david blackwell
    Participant

      Is it possible to add a personal new date format to the list of standard formats already available?

      For example, I see a date format in the form of: “d Mon” in the drop down menu which would format a date for today as: “5 Feb”.

      What I’d like to do is add a new custom date format such as: “dd Mon yyyy” which would return a date for today as “05 Feb 2022″.

      I searched for style and text settings, but did not find what I was looking for. My alternative is to just select the available ‘d Mon’ format and hand type a ” 2022″ text element inline and after the date variable in a string of text.

      BTW: I often use these variable for “Chart last updated: xx” notations in the margins of charts I regularly update and publish.

      Any help or suggestions are appreciated. Thank you.

      • This topic was modified 2 years, 9 months ago by david blackwell.
      • This topic was modified 2 years, 9 months ago by david blackwell.
      #8288
      david blackwell
      Participant

        I was actually able to answer this on my own. The short answer is to create a time or a number variable in the form of a date (e.g. yyyy:mm:dd). Then, create two instances of the variable in a label or text field, formatting the first, using the example in my question, as:”d Mon”. And using the second variable formatted as “yyyy”.

        This was probably a simple and obvious answer for many, but I had a little mental block on it. It finally occurred to me after my second cup of coffee this morning. It is probably why the Datagraph team formatted dates the way they did – to offer the user a lot of flexibility.

        Here’s a screen shot of it in action. I formatted my dates a little differently in this example than I did in my first question to the forum:

        date-date-sm

        • This reply was modified 2 years, 9 months ago by david blackwell. Reason: Corrected typos. Added hashes to tags
        #8292
        david
        Moderator

          That’s right. It is certainly possible to add a mapper like is available for values, but instead there are ways to extract just the day, month (numer or text) and year so you can customize the format.   But it is an oversight to not add the Month day, year as an option.

        Viewing 3 posts - 1 through 3 (of 3 total)
        • You must be logged in to reply to this topic.

        DataGraph Forums Technical Support Support Desk Adding new formats for date variables?