Skip to main content

How to Add a Date-Only Column to a SharePoint List with the REST API in Power Automate

· 6 min read
Jagdish Kumawat
Founder @ Dewiride

A birthday is a date, not a moment in time. A SharePoint date column shows only the date when its XML says Format='DateOnly'. A flow can create one with the REST API, next to a date-and-time column for anything with a time.

Syntax​

The column is one Field element, sent to createfieldasxml with Send an HTTP request to SharePoint. How to Add a Column to a SharePoint List with CreateFieldAsXml explains the request; only the XML changes here:

Date column: general form
<Field Type='DateTime' Name='<internal name>' StaticName='<internal name>' DisplayName='<display name>' Description='<description>' Format='<DateOnly or DateTime>' FriendlyDisplayFormat='Disabled' Required='TRUE' />
  • Type='DateTime': a date column, with or without a time. Microsoft's Field element reference says to use the Format attribute to specify date formatting.
  • Format: DateOnly to display (and allow edits to) only the date portion, where the time portion is set to 12:00 A.M.. DateTime to display and edit both date and time of day, which is the default.
  • FriendlyDisplayFormat='Disabled' (optional): show the date itself, as when Friendly format is No in the column's settings. It isn't in the Field element reference; Disabled and Relative come from Microsoft's DateTimeFieldFriendlyFormatType list.
  • Required='TRUE' (optional): the column must have a value.

The Example​

A blank list called Birthdays gets two date columns:

ColumnFormatHolds
BirthdayDateOnlyThe day a person was born; required
PartyStartsDateTimeWhen their party starts, with a time

The flow has the trigger Manually trigger a flow and two Send an HTTP request to SharePoint actions, Add Birthday and Add PartyStarts.

Prerequisites​

  • Permission to change the list, such as Edit or Full Control on the site, for the account the flow's SharePoint connection uses.

Step 1: Add the Date-Only Column​

Add Send an HTTP request to SharePoint, rename it Add Birthday, and fill it in:

FieldValue
Site AddressYour site
MethodPOST
Uri_api/web/lists/getbytitle('Birthdays')/fields/createfieldasxml
HeadersAccept: application/json;odata=nometadata
Content-Type: application/json;odata=verbose

The headers are under Advanced parameters. The body:

Add Birthday → Body
{
"parameters": {
"__metadata": { "type": "SP.XmlSchemaFieldCreationInformation" },
"SchemaXml": "<Field Type='DateTime' Name='Birthday' StaticName='Birthday' DisplayName='Birthday' Description='The day the person was born.' Required='TRUE' Format='DateOnly' FriendlyDisplayFormat='Disabled' />",
"Options": 25
}
}

The Add Birthday action with Method POST, the Uri _api/web/lists/getbytitle('Birthdays')/fields/createfieldasxml, the Accept and Content-Type headers, and the Body whose SchemaXml has Type DateTime, Name Birthday, Required TRUE, Format DateOnly and FriendlyDisplayFormat Disabled

Step 2: Add a Date-and-Time Column​

Add a second action, Add PartyStarts, with the same site, method, Uri and headers. Its XML has Format='DateTime' instead, and no Required:

Add PartyStarts → Body
{
"parameters": {
"__metadata": { "type": "SP.XmlSchemaFieldCreationInformation" },
"SchemaXml": "<Field Type='DateTime' Name='PartyStarts' StaticName='PartyStarts' DisplayName='PartyStarts' Description='When the party starts.' Format='DateTime' FriendlyDisplayFormat='Disabled' />",
"Options": 25
}
}

Save the flow and test it manually (How to Test a Cloud Flow Manually in Power Automate). Both actions succeeded.

The Result​

In the list, I added an item: Ada, with 2/14/1990 typed as the birthday and 12/5/2026 as the party, without a time. This site uses the US date format, so those are 14 February 1990 and 5 December 2026. The saved item shows the difference:

The item Ada with Birthday 2/14/1990 and PartyStarts 12/5/2026 12:00 AM

Birthday shows only the date. PartyStarts shows a time too, 12:00 AM, because no time was typed.

The date's order comes from the site's regional settings, not from the column (How to Change the Date Format of a SharePoint Site).

Common Mistakes​

MistakeWhat happensDo this instead
Leaving out FormatThe column shows a time as well, because DateTime is the defaultWrite Format='DateOnly'
Type='Date'The reference has no Date type; dates are DateTimeUse Type='DateTime' with Format
Reading a typed date in the wrong order12/5/2026 is December on a US site, May on a UK oneCheck the site's date format
Running the flow again unchangedIt tries to add the columns a second timeCheck that the column is missing first

Troubleshooting​

SymptomLikely causeFix
The date column shows 12:00 AMIt's a DateTime columnCreate it with Format='DateOnly'
Dates show as words, such as 22 minutes agoThe column uses the relative friendly formatSet FriendlyDisplayFormat='Disabled'
Status 404No list with that title on the siteCheck the title in getbytitle('…')

FAQ​

How does a flow write to a date-only column?​

With a date such as 2026-10-02 in Create item or Update item (How to Create an Item in a SharePoint List in Power Automate).

Can I turn an existing date-and-time column into a date-only one?​

Yes, in the column's settings in the browser: Include Time No (How to Add a Date Column to a SharePoint List). This request creates new columns.

Does this need a premium licence?​

No. Send an HTTP request to SharePoint is part of the standard SharePoint connector.

Conclusion​

Create a date column with Type='DateTime' and Format='DateOnly' when only the day matters, and Format='DateTime' when the time does too. FriendlyDisplayFormat='Disabled' keeps the date as a date instead of words such as 22 minutes ago.

Additional Resources​