KaxSchedulerDisplayToUtc Method |
Converts a date time object from client date format to UTC using the
TimeZoneOffset property.
Namespace: Kettic.AspNet.ControlsAssembly: Kettic.AspNet.Controls (in Kettic.AspNet.Controls.dll) Version: 2014.4.1129.0 (2014.04.1129.0)
Syntaxpublic DateTime DisplayToUtc(
DateTime displayDate
)
Public Function DisplayToUtc (
displayDate As DateTime
) As DateTime
public:
virtual DateTime DisplayToUtc(
DateTime displayDate
) sealed
abstract DisplayToUtc :
displayDate : DateTime -> DateTime
override DisplayToUtc :
displayDate : DateTime -> DateTime
Parameters
- displayDate
- Type: SystemDateTime
The date to convert. Must be in client format.
Return Value
Type:
DateTime
The date in UTC format which corresponds to the supplied client format date.
Remarks
KaxScheduler always stores dates in UTC format to allow support for multiple time zones. The
DisplayToUtc method must be used when
a date is supplied to KaxScheduler to be persisted in some way. For example updating the
Appointment.Start property from a textbox.
ExamplesAppointment appointment = KaxScheduler1.Appointments[0];
DateTime startInClientFormat = DateTime.Parse(TextBox1.Text);
appointment.Start = KaxScheduler1.DisplayToUtc(startInClientFormat);
KaxScheduler1.Update(appointment);
Dim appointment As Appointment = KaxScheduler1.Appointments(0)
Dim startInClientFormat As DateTime = DateTime.Parse(TextBox1.Text)
appointment.Start = KaxScheduler1.DisplayToUtc(startInClientFormat)
KaxScheduler1.Update(appointment)
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
See Also