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

Announcements
Q&A with Qlik - Qlik Cloud Migration: Questions about migrating to Qlik Cloud? Catch the latest replay!
cancel
Showing results for 
Search instead for 
Did you mean: 
bobbydave
Creator III
Creator III

Whats up with year

I am importing an excel sheet with 2017 text.

I am trying to convert it to a YEAR in QV and it appears as follows.

I've tried

Date#(F1, 'YYYY')     appears as 2017.00000

Date(F1, 'YYYY')       appears as 1905

Year(F1)                    appears as 1905

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

Can you try this

Num(Num#(F1))

or

Num(F1 * 1)

View solution in original post

11 Replies
sunny_talwar
MVP
MVP

May be try this

Year(Date#(F1, 'YYYY')) as Year

bobbydave
Creator III
Creator III
Author

Appearing as blank now.

Screenshot attached

sasiparupudi1
Master III
Master III

try round(F1)

bobbydave
Creator III
Creator III
Author

same as above. blank

sasiparupudi1
Master III
Master III

Year(Trim(Subfield(F1,'.',1)))



Year(Date#(Trim(Subfield(F1,'.',1)),'YYYY'))

sunny_talwar
MVP
MVP

Can you try this

Num(Num#(F1))

or

Num(F1 * 1)

niclaz79
Partner - Creator III
Partner - Creator III

Floor(Date#(F1, 'YYYY'))

marcus_sommer
MVP
MVP

It seems that your field contained a string with numbers whereby it isn't a date else it's just a year-value. Therefore try something like this:

num(F1)

or

num(num#(F1, '####.######', '', '.'))

- Marcus

MarcoWedel
MVP
MVP

another one:

MakeDate(F1)