Language

SqlServerDbFunctionsExtensions.DateTrunc メソッド

定義

オーバーロード

Name 説明
DateTrunc(DbFunctions, String, Nullable<DateTimeOffset>)

指定したdatepart有効桁数にdateTimeOffsetを切り捨てます。 SQL ServerのDATETRUNC(datepart, date)に対応します。

DateTrunc(DbFunctions, String, Nullable<TimeOnly>)

指定したdatepart有効桁数にtimeを切り捨てます。 SQL ServerのDATETRUNC(datepart, date)に対応します。

DateTrunc(DbFunctions, String, Nullable<DateTime>)

指定したdatepart有効桁数にdateを切り捨てます。 SQL ServerのDATETRUNC(datepart, date)に対応します。

DateTrunc(DbFunctions, String, TimeOnly)

指定したdatepart有効桁数にtimeを切り捨てます。 SQL ServerのDATETRUNC(datepart, date)に対応します。

DateTrunc(DbFunctions, String, DateTimeOffset)

指定したdatepart有効桁数にdateTimeOffsetを切り捨てます。 SQL ServerのDATETRUNC(datepart, date)に対応します。

DateTrunc(DbFunctions, String, DateTime)

指定したdatepart有効桁数にdateを切り捨てます。 SQL ServerのDATETRUNC(datepart, date)に対応します。

DateTrunc(DbFunctions, String, DateOnly)

指定したdatepart有効桁数にdateを切り捨てます。 SQL ServerのDATETRUNC(datepart, date)に対応します。

DateTrunc(DbFunctions, String, Nullable<DateOnly>)

指定したdatepart有効桁数にdateを切り捨てます。 SQL ServerのDATETRUNC(datepart, date)に対応します。

DateTrunc(DbFunctions, String, Nullable<DateTimeOffset>)

ソース:
SqlServerDbFunctionsExtensions.cs

指定したdatepart有効桁数にdateTimeOffsetを切り捨てます。 SQL ServerのDATETRUNC(datepart, date)に対応します。

public static DateTimeOffset? DateTrunc(this Microsoft.EntityFrameworkCore.DbFunctions _, string datepart, DateTimeOffset? dateTimeOffset);
static member DateTrunc : Microsoft.EntityFrameworkCore.DbFunctions * string * Nullable<DateTimeOffset> -> Nullable<DateTimeOffset>
<Extension()>
Public Function DateTrunc (_ As DbFunctions, datepart As String, dateTimeOffset As Nullable(Of DateTimeOffset)) As Nullable(Of DateTimeOffset)

パラメーター

_
DbFunctions

DbFunctions のインスタンスです。

datepart
String

切り捨てる日付パーツ。 year、quarter、month、dayofyear、day、week、iso_week、hour、minute、second、millisecond、microsecondのいずれかです。

dateTimeOffset
Nullable<DateTimeOffset>

切り捨てる値。

戻り値

切り捨てられた DateTimeOffset 値。

注釈

詳細と例については、「データベース関数」および「EF Core を使用したSQL ServerおよびAzure SQLデータベースへのアクセス」を参照してください。

適用対象

DateTrunc(DbFunctions, String, Nullable<TimeOnly>)

ソース:
SqlServerDbFunctionsExtensions.cs

指定したdatepart有効桁数にtimeを切り捨てます。 SQL ServerのDATETRUNC(datepart, date)に対応します。

public static TimeOnly? DateTrunc(this Microsoft.EntityFrameworkCore.DbFunctions _, string datepart, TimeOnly? time);
static member DateTrunc : Microsoft.EntityFrameworkCore.DbFunctions * string * Nullable<TimeOnly> -> Nullable<TimeOnly>
<Extension()>
Public Function DateTrunc (_ As DbFunctions, datepart As String, time As Nullable(Of TimeOnly)) As Nullable(Of TimeOnly)

パラメーター

_
DbFunctions

DbFunctions のインスタンスです。

datepart
String

切り捨てる日付パーツ。 year、quarter、month、dayofyear、day、week、iso_week、hour、minute、second、millisecond、microsecondのいずれかです。

time
Nullable<TimeOnly>

切り捨てる値。

戻り値

切り捨てられた TimeOnly 値。

注釈

詳細と例については、「データベース関数」および「EF Core を使用したSQL ServerおよびAzure SQLデータベースへのアクセス」を参照してください。

適用対象

DateTrunc(DbFunctions, String, Nullable<DateTime>)

ソース:
SqlServerDbFunctionsExtensions.cs

指定したdatepart有効桁数にdateを切り捨てます。 SQL ServerのDATETRUNC(datepart, date)に対応します。

public static DateTime? DateTrunc(this Microsoft.EntityFrameworkCore.DbFunctions _, string datepart, DateTime? date);
static member DateTrunc : Microsoft.EntityFrameworkCore.DbFunctions * string * Nullable<DateTime> -> Nullable<DateTime>
<Extension()>
Public Function DateTrunc (_ As DbFunctions, datepart As String, date As Nullable(Of DateTime)) As Nullable(Of DateTime)

パラメーター

_
DbFunctions

DbFunctions のインスタンスです。

datepart
String

切り捨てる日付パーツ。 year、quarter、month、dayofyear、day、week、iso_week、hour、minute、second、millisecond、microsecondのいずれかです。

date
Nullable<DateTime>

切り捨てる値。

戻り値

切り捨てられた DateTime 値。

注釈

詳細と例については、「データベース関数」および「EF Core を使用したSQL ServerおよびAzure SQLデータベースへのアクセス」を参照してください。

適用対象

DateTrunc(DbFunctions, String, TimeOnly)

ソース:
SqlServerDbFunctionsExtensions.cs

指定したdatepart有効桁数にtimeを切り捨てます。 SQL ServerのDATETRUNC(datepart, date)に対応します。

public static TimeOnly DateTrunc(this Microsoft.EntityFrameworkCore.DbFunctions _, string datepart, TimeOnly time);
static member DateTrunc : Microsoft.EntityFrameworkCore.DbFunctions * string * TimeOnly -> TimeOnly
<Extension()>
Public Function DateTrunc (_ As DbFunctions, datepart As String, time As TimeOnly) As TimeOnly

パラメーター

_
DbFunctions

DbFunctions のインスタンスです。

datepart
String

切り捨てる日付パーツ。 year、quarter、month、dayofyear、day、week、iso_week、hour、minute、second、millisecond、microsecondのいずれかです。

time
TimeOnly

切り捨てる値。

戻り値

切り捨てられた TimeOnly 値。

注釈

詳細と例については、「データベース関数」および「EF Core を使用したSQL ServerおよびAzure SQLデータベースへのアクセス」を参照してください。

適用対象

DateTrunc(DbFunctions, String, DateTimeOffset)

ソース:
SqlServerDbFunctionsExtensions.cs

指定したdatepart有効桁数にdateTimeOffsetを切り捨てます。 SQL ServerのDATETRUNC(datepart, date)に対応します。

public static DateTimeOffset DateTrunc(this Microsoft.EntityFrameworkCore.DbFunctions _, string datepart, DateTimeOffset dateTimeOffset);
static member DateTrunc : Microsoft.EntityFrameworkCore.DbFunctions * string * DateTimeOffset -> DateTimeOffset
<Extension()>
Public Function DateTrunc (_ As DbFunctions, datepart As String, dateTimeOffset As DateTimeOffset) As DateTimeOffset

パラメーター

_
DbFunctions

DbFunctions のインスタンスです。

datepart
String

切り捨てる日付パーツ。 year、quarter、month、dayofyear、day、week、iso_week、hour、minute、second、millisecond、microsecondのいずれかです。

dateTimeOffset
DateTimeOffset

切り捨てる値。

戻り値

切り捨てられた DateTimeOffset 値。

注釈

詳細と例については、「データベース関数」および「EF Core を使用したSQL ServerおよびAzure SQLデータベースへのアクセス」を参照してください。

適用対象

DateTrunc(DbFunctions, String, DateTime)

ソース:
SqlServerDbFunctionsExtensions.cs

指定したdatepart有効桁数にdateを切り捨てます。 SQL ServerのDATETRUNC(datepart, date)に対応します。

public static DateTime DateTrunc(this Microsoft.EntityFrameworkCore.DbFunctions _, string datepart, DateTime date);
static member DateTrunc : Microsoft.EntityFrameworkCore.DbFunctions * string * DateTime -> DateTime
<Extension()>
Public Function DateTrunc (_ As DbFunctions, datepart As String, date As DateTime) As DateTime

パラメーター

_
DbFunctions

DbFunctions のインスタンスです。

datepart
String

切り捨てる日付パーツ。 year、quarter、month、dayofyear、day、week、iso_week、hour、minute、second、millisecond、microsecondのいずれかです。

date
DateTime

切り捨てる値。

戻り値

切り捨てられた DateTime 値。

注釈

詳細と例については、「データベース関数」および「EF Core を使用したSQL ServerおよびAzure SQLデータベースへのアクセス」を参照してください。

適用対象

DateTrunc(DbFunctions, String, DateOnly)

ソース:
SqlServerDbFunctionsExtensions.cs

指定したdatepart有効桁数にdateを切り捨てます。 SQL ServerのDATETRUNC(datepart, date)に対応します。

public static DateOnly DateTrunc(this Microsoft.EntityFrameworkCore.DbFunctions _, string datepart, DateOnly date);
static member DateTrunc : Microsoft.EntityFrameworkCore.DbFunctions * string * DateOnly -> DateOnly
<Extension()>
Public Function DateTrunc (_ As DbFunctions, datepart As String, date As DateOnly) As DateOnly

パラメーター

_
DbFunctions

DbFunctions のインスタンスです。

datepart
String

切り捨てる日付パーツ。 year、quarter、month、dayofyear、day、week、iso_week、hour、minute、second、millisecond、microsecondのいずれかです。

date
DateOnly

切り捨てる値。

戻り値

切り捨てられた DateOnly 値。

注釈

詳細と例については、「データベース関数」および「EF Core を使用したSQL ServerおよびAzure SQLデータベースへのアクセス」を参照してください。

適用対象

DateTrunc(DbFunctions, String, Nullable<DateOnly>)

ソース:
SqlServerDbFunctionsExtensions.cs

指定したdatepart有効桁数にdateを切り捨てます。 SQL ServerのDATETRUNC(datepart, date)に対応します。

public static DateOnly? DateTrunc(this Microsoft.EntityFrameworkCore.DbFunctions _, string datepart, DateOnly? date);
static member DateTrunc : Microsoft.EntityFrameworkCore.DbFunctions * string * Nullable<DateOnly> -> Nullable<DateOnly>
<Extension()>
Public Function DateTrunc (_ As DbFunctions, datepart As String, date As Nullable(Of DateOnly)) As Nullable(Of DateOnly)

パラメーター

_
DbFunctions

DbFunctions のインスタンスです。

datepart
String

切り捨てる日付パーツ。 year、quarter、month、dayofyear、day、week、iso_week、hour、minute、second、millisecond、microsecondのいずれかです。

date
Nullable<DateOnly>

切り捨てる値。

戻り値

切り捨てられた DateOnly 値。

注釈

詳細と例については、「データベース関数」および「EF Core を使用したSQL ServerおよびAzure SQLデータベースへのアクセス」を参照してください。

適用対象