Share via


SqlCeFunctions.DatePart Method

Definition

Overloads

DatePart(String, String)

Returns an integer that represents the specified datepart of the specified date.

DatePart(String, Nullable<DateTime>)

Returns an integer that represents the specified datepart of the specified date.

DatePart(String, String)

Returns an integer that represents the specified datepart of the specified date.

[System.Data.Entity.DbFunction("SqlServerCe", "DATEPART")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="datePartArg")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="date")]
public static Nullable<int> DatePart (string datePartArg, string date);
static member DatePart : string * string -> Nullable<int>
Public Shared Function DatePart (datePartArg As String, date As String) As Nullable(Of Integer)

Parameters

datePartArg
String

The part of the date to return the value.

date
String

The date.

Returns

The specified datepart of the specified date.

Attributes

Applies to

DatePart(String, Nullable<DateTime>)

Returns an integer that represents the specified datepart of the specified date.

[System.Data.Entity.DbFunction("SqlServerCe", "DATEPART")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="date")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="datePartArg")]
public static Nullable<int> DatePart (string datePartArg, Nullable<DateTime> date);
static member DatePart : string * Nullable<DateTime> -> Nullable<int>
Public Shared Function DatePart (datePartArg As String, date As Nullable(Of DateTime)) As Nullable(Of Integer)

Parameters

datePartArg
String

The part of the date to return the value.

date
Nullable<DateTime>

The date.

Returns

The the specified datepart of the specified date.

Attributes

Applies to