Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
tmumaw
Specialist II
Specialist II

Year only

Can someone please explain why I can't get just the year using this:

Year([Valid Frm Date]) as [Valid Year], my date format is YYYY-MM-DD

Labels (1)
1 Solution

Accepted Solutions
Digvijay_Singh
MVP
MVP

One possibility could be that your field has not interpreted as date, you may need to use this -

Year(Date#([Valid Frm Date],'SourceFieldformat')) as [Valid Year], my date format is YYYY-MM-DD

Use 'YYYY-MM-DD' in place of sourcefieldformat if the source data has this format.

View solution in original post

3 Replies
Digvijay_Singh
MVP
MVP

One possibility could be that your field has not interpreted as date, you may need to use this -

Year(Date#([Valid Frm Date],'SourceFieldformat')) as [Valid Year], my date format is YYYY-MM-DD

Use 'YYYY-MM-DD' in place of sourcefieldformat if the source data has this format.

sunny_talwar
MVP
MVP

tmumaw
Specialist II
Specialist II
Author

Thanks.  Running into a few problems from our upgrade this past weekend.  New server, new release of QV 12.20, new SAP Connector......