Combining a Date and Character String into a Single Character String

Article Number:040741

By using the DATE_FORMAT function in a formula, date, date & time, and time can be treated as strings.
If you specify a field code without using the DATE_FORMAT function, the field code does not display the date in a recognizable style. For example, if you specify "'Report creation date' & date" for a field code, "Report creation date 1575504000" is displayed. This is because the date values are treated as UNIX time.

If you use the DATE_FORMAT function and specify ""Report creation date" & DATE_FORMAT(Date, "MM-dd", "Etc/GMT")", the date is displayed as "Report creation date 12-05".


This section describes the way to concatenate the DATE_FORMAT function with a string, by using an example of the Operating Report app.
Image of the created app:

  1. Click the app settings button Settings button at the upper right of the "View" screen and select the Form tab.

  2. Select the Date field and the Created by field in the parts list shown in the left side, and place them in the form.

  3. Place the Text field for displaying a title.
    Make the field width longer so that title is displayed in one line.

  4. Open the screen to set the Text field, and change the field name to "Title".
    Keep the setting screen open.

  5. Select "Calculate automatically", and enter the formula.

    • Formula:
      "Report creation date" & " " & DATE_FORMAT(Date, "MM-dd", "Etc/GMT") & " " & Created by
  6. Click Save on the field settings screen.

  7. Click Save Form on the upper left side of the screen, and then click Update App on the upper right side of the screen.

When you create a record in the Operating Report app, the report creation date you specified using the DATE_FORMAT function is displayed with the values of "Date" and "Created by".

If you set the Title field as a title of a record, it will be displayed as a header title of a notification. You can also display it in the list of records. Refer to Setting the Record Title
Refer to Configuring Views

This is also useful when you want to sort records by dates or by user names (in a "Task Management" app, etc.).