Date

represent or create a specific date value.

The Date function in Power FX is used to represent or create a specific date value. It allows you to work with dates in your app, whether you’re calculating deadlines, tracking important dates, or simply displaying date information.

Syntax

Date(Year, Month, Day)
  • Year: A number representing the year (e.g., 2024).

  • Month: A number representing the month (1 to 12).

  • Day: A number representing the day of the month (1 to 31).

Example

If you want to create the date September 18, 2024, the formula would look like this:

Date(2024, 9, 18)

This will return the specific date of September 18, 2024.

Special note

The date format of the Power FX formula's raw data and the format of AppAlloy's DateTime data are different. AppAlloy's DateTime data is always ISO 8061 formatted.

Therefore, you will need to convert the Power FX formula's raw data so it can be shown in the same format. Use Text(). The syntax will be:

Text(Date(Year, Month, Day), "yyyy-MM-dd")

Last updated