Continuing with the LINQ tips, today we provide a list of System.DateTime properties and methods that are supported by the Telerik OpenAccess ORM LINQ implementation. The table below provides the equivalent SQL function call for every member.

 

Please note that the table lists the MS SqlServer specific SQL translation.

 

Properties

DateTime.Day DAY(date)
DateTime.Hour DATEPART(hour, date)
DateTime.Millisecond DATEPART(millisecond,date)
DateTime.Minute DATEPART(minute, date)
DateTime.Month MONTH(date)
DateTime.Second DATEPART(second, date)
DateTime.Year YEAR(date)

 

Static Methods

DateTime.Parse(String) value is parsed on the client side and the result is pushed to the server as filter
DateTime.Parse(String,IFormatProvider) value is parsed on the client side and the result is pushed to the server as filter
DateTime.Parse(String,IFormatProvider,DateTimeStyles) value is parsed on the client side and the result is pushed to the server as filter

 

The various comparison operators that are overloaded by System.DateTime are automatically supported.


Comments

Comments are disabled in preview mode.