Field controlsModel-driven app

Date and time

Date only and date and time columns with a calendar, a time list and a behaviour setting for time zones.

Show me in the demoOpens the demo app with this component highlighted.

What it is

A Date and Time column has a Format and a Behavior. Format decides whether the time is shown: Date and time, or Date only. Behavior decides how the value is adjusted: User local converts to each user's time zone, Time zone independent shows the same value to everyone, and Date only stores no time at all. The form offers a calendar flyout and, for date and time, a list of times. You can also type the date.

When to use it

Use Date only for birthdays, release dates and deadlines that must read the same everywhere. Use User local for moments such as meetings. Use Time zone independent when the time is local to a place, such as a check-in time.

Licensing and configuration

No extra licence. Choose the Format in the table designer and expand the advanced options to set the Behavior. Dataverse stores values in UTC. Users set their time zone in Personalization settings, not in the operating system.

Pitfalls

  • Avoid the Date only format with User local behavior. People in other time zones can see a different day.
  • You can change User local once, to Date only or Time zone independent. Date only and Time zone independent cannot be changed afterwards.
  • Changing the behavior of a column does not convert existing values. They stay in UTC.
  • Check business rules and calculated columns that use the column after you change its behavior.

Try it in the demo

  1. Open the Dates section of the first accelerator.
  2. Open the calendar on the Date only field, pick a day, and then type a date instead.
  3. Pick a time on the Date and time field.
  4. Change the time zone in Personalization settings and return to the form.