Dela via


Appointment.StartTime Property

Definition

Gets or sets the starting time for the appointment. StartTime is of type DateTime.

public:
 property DateTime StartTime { DateTime get(); void set(DateTime value); };
DateTime StartTime();

void StartTime(DateTime value);
public System.DateTimeOffset StartTime { get; set; }
var dateTime = appointment.startTime;
appointment.startTime = dateTime;
Public Property StartTime As DateTimeOffset

Property Value

The date and time to use as the starting time for the appointment.

Windows requirements

App capabilities
appointmentsSystem

Remarks

This property uses an object representing date and time, and that object is represented differently depending on which language you are programming with.

  • In JavaScript, set the StartTime value with a Date object. For example, this code sets a StartTime value to a specific date and time. ```javascript appointment.startTime = new Date(2015, 9, 10, 9); // October 10th, 2015 at 9:00am


+ In Visual C++ component extensions (C++/CX), use a <xref href="Windows.Foundation.DateTime?text=DateTime" /> structure value.
+ In C# or Microsoft Visual Basic, you use a [System.DateTimeOffset](/dotnet/api/system.datetimeoffset?view=dotnet-uwp-10.0&preserve-view=true) value. You can use utility API of [System.DateTimeOffset](/dotnet/api/system.datetimeoffset?view=dotnet-uwp-10.0&preserve-view=true) to generate a [DateTimeOffset](/dotnet/api/system.datetimeoffset?view=dotnet-uwp-10.0&preserve-view=true) from different inputs (local time, parsed strings, and so on) and set the value.

Applies to