SqlMethods Class
Collapse the table of content
Expand the table of content

SqlMethods Class

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Provides methods that correspond to SQL Server functions. Methods in the SqlMethods class are only supported in LINQ to SQL queries.

System::Object
  System.Data.Linq.SqlClient::SqlMethods

Namespace:  System.Data.Linq.SqlClient
Assembly:  System.Data.Linq (in System.Data.Linq.dll)

No code example is currently available or this language may not be supported.

  NameDescription
Public methodStatic memberDateDiffDay(DateTime, DateTime)Counts the number of day boundaries between two non-nullable dates.
Public methodStatic memberDateDiffDay(Nullable<DateTime>, Nullable<DateTime>)Counts the number of day boundaries between two nullable dates.
Public methodStatic memberDateDiffDay(DateTimeOffset, DateTimeOffset)Counts the number of day boundaries between two non-nullable dates.
Public methodStatic memberDateDiffDay(Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)Counts the number of day boundaries between two nullable dates.
Public methodStatic memberDateDiffHour(DateTime, DateTime)Counts the number of hour boundaries between two non-nullable dates.
Public methodStatic memberDateDiffHour(Nullable<DateTime>, Nullable<DateTime>)Counts the number of hour boundaries between two nullable dates.
Public methodStatic memberDateDiffHour(DateTimeOffset, DateTimeOffset)Counts the number of hour boundaries between two non-nullable dates.
Public methodStatic memberDateDiffHour(Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)Counts the number of hour boundaries between two nullable dates.
Public methodStatic memberDateDiffMicrosecond(DateTime, DateTime)Counts the number of microsecond boundaries between two non-nullable dates.
Public methodStatic memberDateDiffMicrosecond(Nullable<DateTime>, Nullable<DateTime>)Counts the number of microsecond boundaries between two nullable dates.
Public methodStatic memberDateDiffMicrosecond(DateTimeOffset, DateTimeOffset)Counts the number of microsecond boundaries between two non-nullable dates.
Public methodStatic memberDateDiffMicrosecond(Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)Counts the number of microsecond boundaries between two nullable dates.
Public methodStatic memberDateDiffMillisecond(DateTime, DateTime)Counts the number of millisecond boundaries between two non-nullable dates.
Public methodStatic memberDateDiffMillisecond(Nullable<DateTime>, Nullable<DateTime>)Counts the number of millisecond boundaries between two nullable dates.
Public methodStatic memberDateDiffMillisecond(DateTimeOffset, DateTimeOffset)Counts the number of millisecond boundaries between two non-nullable dates.
Public methodStatic memberDateDiffMillisecond(Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)Counts the number of millisecond boundaries between two nullable dates.
Public methodStatic memberDateDiffMinute(DateTime, DateTime)Counts the number of minute boundaries between two non-nullable dates.
Public methodStatic memberDateDiffMinute(Nullable<DateTime>, Nullable<DateTime>)Counts the number of minute boundaries between two nullable dates.
Public methodStatic memberDateDiffMinute(DateTimeOffset, DateTimeOffset)Counts the number of minute boundaries between two non-nullable dates.
Public methodStatic memberDateDiffMinute(Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)Counts the number of minute boundaries between two nullable dates.
Public methodStatic memberDateDiffMonth(DateTime, DateTime)Counts the number of month boundaries between two non-nullable dates.
Public methodStatic memberDateDiffMonth(Nullable<DateTime>, Nullable<DateTime>)Counts the number of month boundaries between two nullable dates.
Public methodStatic memberDateDiffMonth(DateTimeOffset, DateTimeOffset)Counts the number of month boundaries between two non-nullable dates.
Public methodStatic memberDateDiffMonth(Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)Counts the number of month boundaries between two nullable dates.
Public methodStatic memberDateDiffNanosecond(DateTime, DateTime)Counts the number of nanosecond boundaries between two non-nullable dates.
Public methodStatic memberDateDiffNanosecond(Nullable<DateTime>, Nullable<DateTime>)Counts the number of nanosecond boundaries between two nullable dates.
Public methodStatic memberDateDiffNanosecond(DateTimeOffset, DateTimeOffset)Counts the number of nanosecond boundaries between two non-nullable dates.
Public methodStatic memberDateDiffNanosecond(Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)Counts the number of nanosecond boundaries between two nullable dates.
Public methodStatic memberDateDiffSecond(DateTime, DateTime)Counts the number of second boundaries between two non-nullable dates.
Public methodStatic memberDateDiffSecond(Nullable<DateTime>, Nullable<DateTime>)Counts the number of second boundaries between two nullable dates.
Public methodStatic memberDateDiffSecond(DateTimeOffset, DateTimeOffset)Counts the number of second boundaries between two non-nullable dates.
Public methodStatic memberDateDiffSecond(Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)Counts the number of second boundaries between two nullable dates.
Public methodStatic memberDateDiffYear(DateTime, DateTime)Counts the number of year boundaries between two non-nullable dates.
Public methodStatic memberDateDiffYear(Nullable<DateTime>, Nullable<DateTime>)Counts the number of year boundaries between two nullable dates.
Public methodStatic memberDateDiffYear(DateTimeOffset, DateTimeOffset)Counts the number of year boundaries between two non-nullable dates.
Public methodStatic memberDateDiffYear(Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)Counts the number of year boundaries between two nullable dates.
Public methodStatic memberLike(String, String)Determines whether a specific character string matches a specified pattern. This method is currently only supported in LINQ to SQL queries.
Public methodStatic memberLike(String, String, Char)Determines whether a specific character string matches a specified pattern. This method is currently only supported in LINQ to SQL queries.
Top

Windows Phone OS

Supported in: 8.1, 8.0

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Show:
© 2017 Microsoft