Search code examples
sqlvisual-studiodatetimecrystal-reports

Crystal reports SQL Expression to extract Year from a DateTime column


I'm very new to Crystal Reports and how SQL Expressions work.

But I need to make an SQL Expression to show only the year instead of the full DateTime, for example the field in Crystal Reports shows:

01/01/2000

I want an SQL Expression in Crystal Reports that shows the DateTime as:

2000

My column is called: "Film"."ReleaseDate"


Solution

  • {fn YEAR("Film"."ReleaseDate")}