This documentation is archived and is not being maintained.

CrmDateTime.Value Property

Dynamics
banner art

[Applies to: Microsoft Dynamics CRM 4.0]

Find the latest SDK documentation: CRM 2015 SDK

Gets or sets the attribute value in UTC format.

Syntax

[Visual Basic .NET]
Public Property Value As String
[C#]
public string Value {get; set;}

Property Value

The value of this property is a String type.

Remarks

This property is required when you set an attribute value. A CrmDateTime value can represent either local time or can be UTC-based as shown in the following table.

User time onlyyyyy-MM-ddTHH:mm:ss
UTC onlyyyyy-MM-ddTHH:mm:ss Z
Bothyyyy-MM-ddTHH:mm:ss Offset

Where Offset is one of the following:

+##:##

-##:##


MM is the month (01-12)

dd is the day of month (01-31)

cc is the century (00-99)

yy is the year (00-99)

hh is the hour (0-23)

mm is the minutes (0-59)

ss is the seconds (1-59)

# is a digit between 0 and 9

Valid Values

Minimum value: 1900/1/1 00:00:00

Maximum value:  9999/12/30 23:59:59

You can use the CrmDateTime.MinValue and CrmDateTime.MaxValue provided in the SDK\Helpers\CS\CrmHelpers\CorePartialTypes.cs file. For more information, see Helper Code.

Example

The following example shows how to set a date/time attribute value.

CrmDateTime dateTime = new CrmDateTime();
dateTime.Value = "2006/5/27T17:00:00";

Requirements

Namespace: CrmService

See Also

Reference


© 2010 Microsoft Corporation. All rights reserved.


Show: