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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
krishna20
Specialist II
Specialist II

Hi Friends

Hi friends

i'm having  a date field not in correct format.Its in numeric value. I need to get the only year in the straight table.How can i fetch it .Can anyone suggest me how to do it?ASAP.

Regards

Krishna

4 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

=Year(MyDateField)


talk is cheap, supply exceeds demand
ashfaq_haseeb
Champion III
Champion III

Hi Kalyan can you post some sample records

Regards

ASHFAQ

PradeepReddy
Specialist II
Specialist II

Try the bellow thing

DateFieldFunction
41003Year(DateField)
20120404Year( Date#(DateField, 'M/D/YY'), 'YYYY-MM-DD')
Not applicable

HI,

If you have year in format 10052007 and you just want to get year

then you can use

right(datefield,4) as Year

this will give you 2007

and if you have year in format

20070531

then you can use

left(datefield,4) as Year

thanks

sudhanshu shrivas