i’m using the reporting module, to make a daily report, so we need the date to be showed at the front, but the date is in English, so my question is there a way to change date from spelled English to spelled on Danish, of cause in the report module?
Reporting module version 5.0.3
Ignition version 8.0.3
I can see two ways of doing this:
- Create a script data source in your report:
from java.text import DateFormat
from java.util import Locale
dateIn = data['StartDate']
l = Locale('da')
df = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG, l)
data['FormattedDate'] = df.format(dateIn)
- Create a string tag that has the date formatted as you wish, and pass it in as a parameter. this has the advantage of being able to use it across multiple reports.