Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Field Type: Date/Time

banner art

The following properties are available:

Date/Time properties Type Description
{Field}.DataValue Date or Null Get/set property.

The original value is left unchanged if the new value cannot be parsed.

{Field}.TimeVisible Boolean Get property.

This property specifies if the time is to be shown.


The following code example shows how to use a field of type Date/Time.

var oDate;
var oToday;

oDate =  crmForm.all.scheduledend.DataValue;
if (oDate == null) {
    oDate = new Date();

oToday = new Date();
oDate = oToday;
oDate = oDate.setHours(17,0,0);

if (oDate.TimeVisible)
   alert("The time is visible.");
   alert("Only the date is visible; the time is hidden.");

crmForm.all.scheduledend.DataValue = oDate;

© 2007 Microsoft Corporation. All rights reserved.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft