Field Type: Date/Time
CRM 1.2
![]() |
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. |
Example
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.");
}
else
{
alert("Only the date is visible; the time is hidden.");
}
crmForm.all.scheduledend.DataValue = oDate;
© 2007 Microsoft Corporation. All rights reserved.

