Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
IMPORTANT security patches for GeoAnalytics Server available to download: READ DETAILS
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

1 Solution

Accepted Solutions
sunny_talwar

Can you try this

Num(Num#(F1))

or

Num(F1 * 1)

View solution in original post

11 Replies
sunny_talwar

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

Can you try this

Num(Num#(F1))

or

Num(F1 * 1)

niclaz79
Partner
Partner

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

marcus_sommer
MVP & Luminary
MVP & Luminary

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

another one:

MakeDate(F1)