### Manual Filter

Manual filter allows you to create filtering expressions with C# LINQ. This filter is mainly used to create conditions which are dependant on current date.
Example 1. Show tickets, that changed in last fourteen dates:

(DateTime.Now-Changed).Value.TotalDays<14

(DateTime.Now-Changed).Value is used here because Changed is of type DateTime?(Nullable). If the field is not Nullable, you must simply write:

(DateTime.Now-Created).TotalDays<14

Example 2. Show all tickets, that have been created within last 2 hours:

(DateTime.Now-Created).TotalHours<2

Example 3. Show all tickets, that have been closed within last two hours:

(DateTime.Now-Closed).Value.TotalHours<2

Example 4. Show all tickets, created in current month:

DateTime.Now.Year == Created.Year && DateTime.Now.Month == Created.Month

Example 5. Show all tickets, created in last month:

DateTime.Now.AddMonths(-1).Year == Created.Year && DateTime.Now.AddMonths(-1).Month == Created.Month

Example 6. Show all tickets, the deadline will expire in the next 2 days:

(Deadline - DateTime.Now).Value.TotalDays <= 2 && (Deadline - DateTime.Now).Value.TotalDays > 0

Example 7. Show all tickets, with expanses in current month:

TaskExpenses.Any(DateTime.Now.Year == Date.Year && DateTime.Now.Month == Date.Month)

Allowed date and time intervals: TotalDays, TotalHours, TotalMinutes, TotalSeconds.

Allowed fields to filter by: Deadline (DateTime?), Created (DateTime), Changed (DateTime?), ReactionDate (DateTime?), Closed (DateTime?).