Built-in Functions → day

day() is a conversion function that returns the day value of the current date.

Signature

day()

Returns

int representing the value of the current day.

Example

Identify the value of the current day, for the current month, 07/2021.

day()

The following table illustrates the behavior of the day() conversion function:

ProductRevenuesday()
CD$20029
Hard disk$60029
Cable$55029
Hardware$80029
Memory Card$22029

Thus, the current day is July 29th, 2021.

Use the following steps for detailed instructions on how to use the day() conversion function:

Note

In the Cluster Management Console (CMC), create a tenant that includes Sample Data. The Sample Data includes the SALES schema.

  • In the Navigation bar, select the Content tab, and then select + New → Add Dashboard.
  • In the Add Dashboard dialog, for Name, enter Product Dashboard, and then select Add.
  • In the Action bar, select + (add icon), or select + Add Insight.
  • In the Insight panel, select Listing Table or V.
  • In Tables, select Aggregated Table.
  • In the Data panel, select Manage Dataset.
  • In the Manage Data Sets panel, in Tables, select SALES. Close the panel.
  • From the Data panel, drag and drop the following columns to the respective tray:
    • Country from the COUNTRIES table to the Grouping Dimension tray.
    • Units from the SALES table to the Measure tray.
  • From the Data panel, drag and drop Add Formula to the Grouping Dimension tray.
  • The Formula Builder automatically opens:
    • In Search Functions, select the down arrow, and then select Conversion Functions.
    • Double-click the day function, day(), to add the formula to the editor.
    • Select Validate & Save.
    • In the Properties panel, for Column Label, enter day().
  • Name the insight Units Per Country.
  • In the Action bar, select Save.