DateTimeExtensions.Round Method (DateTime, RoundTo)

 

Applies To: Dynamics CRM 2015

Rounds a value to the nearest discrete value.

Namespace:   Microsoft.Xrm.Client
Assembly:  Microsoft.Xrm.Client (in Microsoft.Xrm.Client.dll)

Syntax

public static DateTime Round(
    this DateTime d,
    RoundTo to
)
public:
[ExtensionAttribute]
static DateTime Round(
    DateTime d,
    RoundTo to
)
static member Round : 
        d:DateTime *
        to:RoundTo -> DateTime
<ExtensionAttribute>
Public Shared Function Round (
    d As Date,
    to As RoundTo
) As Date

Parameters

Return Value

Type: System.DateTime

Type: DateTime
The nearest discrete value.

See Also

Round Overload
DateTimeExtensions Class
Microsoft.Xrm.Client Namespace
Developer extensions for Microsoft Dynamics CRM 2015

Return to top

© 2017 Microsoft. All rights reserved. Copyright