Project SQL function year() Note: throws an exception outside of a QueryOver expression

Namespace: NHibernate.Criterion
Assembly: NHibernate (in NHibernate.dll) Version: 3.2.0.4000 (3.2.0.4000)

Syntax

C#
public static int YearPart(
	this DateTime dateTimeProperty
)
Visual Basic
<ExtensionAttribute> _
Public Shared Function YearPart ( _
	dateTimeProperty As DateTime _
) As Integer
Visual C++
[ExtensionAttribute]
public:
static int YearPart(
	DateTime dateTimeProperty
)

Parameters

dateTimeProperty
Type: System..::..DateTime

[Missing <param name="dateTimeProperty"/> documentation for "M:NHibernate.Criterion.ProjectionsExtensions.YearPart(System.DateTime)"]

Return Value

[Missing <returns> documentation for "M:NHibernate.Criterion.ProjectionsExtensions.YearPart(System.DateTime)"]

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type DateTime. When you use instance method syntax to call this method, omit the first parameter. For more information, see or .

See Also