0

I want to add the current date/time to a date/time column.

What format do Microsoft Lists require date/time column values to be in when adding them from Power Automate?

I am using the Convert time zone action to convert utcNow() to AEST (UTC +10 hours).

This format string works fine if the column is date only (no time):

yyyy-MM-dd

However, I don't know what format string to use when the column is date AND time.

enter image description here

I can see that the For a selected file action in a flow returns values like these for date/time columns:

2022-09-29T06:30:00Z

In this example, the time is displayed in the SharePoint list as:

29/09/2022 16:30  [ representing the date/time in AEST (UTC +10 hours) ]   

I've tried to find the answer reading articles like these but had no luck:

Datetime

Standard date and time format strings

Custom date and time format strings

How to customize or format Date and Time values in a flow

3
  • You can pass values in 2022-09-29T06:30:00Z format as well as you can direct pass utcNow(). Displayed date and time in SharePoint can be different based on regional settings. Check this and this for more information. Sep 29, 2022 at 8:30
  • I think I had an incorrect understanding, I thought if I wanted to add a timestamp representing 'right now', I needed to convert UTC to my timezone first. however, it seems I need to populate the list with values that are in UTC timezone because the locale settings of SharePoint will update them to display the values that are correct in the local timezone. I just tested update item with the following values and they both added the correct value: formatDateTime(utcNow(),'yyyy-MM-ddThh:mm:ss') or just utcNow(). You can add this as an answer if you like and I can accept it. Sep 29, 2022 at 8:49
  • Great, glad it worked for you! I have added it as an answer below. Sep 29, 2022 at 9:32

1 Answer 1

1

SharePoint always stores the date & time values in UTC format and displays the date & time values in lists based on regional settings of site.

You can pass values to date & time column in 2022-09-29T06:30:00Z (formatDateTime(utcNow(),'yyyy-MM-ddThh:mm:ss')) format as well as you can direct pass utcNow() as value from Power automate flow.

For more information, check this: Incorrect time showing in SharePoint List send by Flow

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.