startOfDay function(Power Automate Cloud flows)

10/10/2023

Japanese version.

Converts to date only by truncating the time portion (to 0:00:0:0) from the specified date and time.

Spec

startOfDay('<timestamp>','<format>')
ArgumentDefaultDescription
timestampRequired fieldSpecifies the date of the conversion source.
Any format other than "yyyy-MM-ddTHH:mm:ss.ffffffffK" will result in an error.
formatyyyy-MM-ddTHH:mm:ss.ffffffffKSpecifies the format of the result. If not specified, the format is "yyyy-MM-ddTHH:mm:ss.ffffffffK" as well as "timestamp".

How to use

In most cases, it is used in the "value" when initializing or setting variables of type "string".

Click on the "Expression" tab, startOfDay, and the function name and () will be set in the expression field.

The first argument is the date and time you want to convert.

When using dynamic content or variables, special specifications are required.

Click on the button, and if the display looks like the following, the setting is complete.

You can change the function by clicking this purple icon.

When the function is executed, the time portion is truncated to 0.

If you want to change the format of the result, specify the format in the second argument.

---

Links

Date and time Functions(Power Automate Cloud flows)