Joget DX 8 Stable Released
The stable release for Joget DX 8 is now available, with a focus on UX and Governance.
Table of Contents |
---|
...
At times, when utilizing aggregate queries on dates, such as Max(), Min(), and AVG(), the resulting columns will yield the following:
Figure 1: Inappropriate date format
To solve the issue, instead of using "Advanced Form Data' as the Data Store. We can use "Database SQL Query" instead.
4
Figure 2: Select the source of data as Database SQL Query
Insert the following query into the "SQL SELECT Query" field.
Code Block |
---|
This is an example. To implement this into your list: 1. Replace "app_fd_tablename" with your desired table name. 2. Replace dataCreated / dateModified with the desired date column. 3. Replace the aliases with custom aliases. 4. You may configure the date format (%Y-%m-%d %H:%i:%s) accordingly. SELECT DATE_FORMAT(MAX(dateCreated), '%Y-%m-%d %H:%i:%s') AS max_dateCreated, DATE_FORMAT(MIN(dateModified), '%Y-%m-%d %H:%i:%s') AS min_dateModified, FROM app_fd_tablename |
Figure 3: SQL Query
Figure 4: Proper date format