DateTime Formatting
Print Topic | Close Window

By Thomas Streitferdt - 7 Years Ago
I need to configure my date time format. Now it returns the values in "3/1/2010 12:00:00 AM" but I only want to get the month like "03" or "March".
I already tried to change it by using following description:
Unfortunately that doesn`t work! Is there a simple solution for that problem? Is it possible using the expression editor to change the format?
Thanks a lot
By Nevron Support - 7 Years Ago
We have added full support for date time formatting in newer versions of the chart (after the Knowledgebase article was published), so now you do not need to write custom code to achieve your formatting goal. Follow these steps:

1. Set the PrimaryX axis scale to Date Time
2. In the Label Formatting group box, change the Formatting Mode to Fixed
3. In the Label Format field enter the desired date time label format. For a description of the date time formatting string refer to this topic in the documentation:
Resources > Date Time Format Strings
By Thomas Streitferdt - 7 Years Ago
Thanks for the support. The problem was that the Scale Mode was set to Automatic. I changed it to Numeric and now it works but I got another problem.

My settings now are

1. PrimaryX axis scale is Date Time
2. Formatting Mode is Fixed
3. My desired date time label format is yyyy-MM

Now it returns
1900-01, 1900-03 etc. in the preview. But my date time starts on 3/1/2010 and not on 1/1/1900.

Now my question is: Where do I change the settings to get the Date Times from 3/1/2010 until now? And not from 1st January 1900? I know why that happens but I don`t find the settings to change the formats...

Thank you in advance
By Nevron Support - 7 Years Ago
The X axis in numeric mode will automatically scale your data range. Perhaps you indeed have a 1/1/1900 date or invalid date in your data set. You can however specify a fixed axis scale from the Axis - Range tab - there in the Begin and End fields you can enter a manual range of the axis.