Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

rutitr14
Contributor

Extract year from date field - QlikSense

Hi,

I have date field in the following format: 6/29/2017 10:35 AM.

I want to extract the year from the field, i try the function year but it doesn't work.

Any Idea?

Thank you!

1 Solution

Accepted Solutions
MVP
MVP

Re: Extract year from date field - QlikSense

Try this

Year(Date#(FieldName, 'M/D/YYYY hh:mm TT')) as Year

4 Replies
MVP
MVP

Re: Extract year from date field - QlikSense

Try this

Year(Date#(FieldName, 'M/D/YYYY hh:mm TT')) as Year

agigliotti
Honored Contributor II

Re: Extract year from date field - QlikSense

maybe this:

Year(Date#(FieldName, 'MM/DD/YYYY hh:mm TT')) as Year

rutitr14
Contributor

Re: Extract year from date field - QlikSense

Great ! it's work - Thank you!

rutitr14
Contributor

Re: Extract year from date field - QlikSense

Thank you