Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Converting text field to a date

The format for [RECEIVED DATE] is 20130402.  I need to get all the records that are 2013 or greater.  I've tried Num#(Left([RECEIVED DATE],4) > 2013, , but not having any luck.  Can someone help me, please.

1 Solution

Accepted Solutions
jerem1234
Specialist II
Specialist II

try this:

Date(Date#([RECEIVED DATE], 'YYYYMMDD'), 'YYYY')>=2013

View solution in original post

5 Replies
jerem1234
Specialist II
Specialist II

try this:

Date(Date#([RECEIVED DATE], 'YYYYMMDD'), 'YYYY')>=2013

Not applicable
Author

If that does not work, try changing it on the script when you load the data:
SET TimestampFormat='YYYYMMDD';
That will recognize that format as being a date

Regards,

Pablo

MayilVahanan

HI

Try like this

Year(Date#([RECEIVED DATE], 'YYYYMMDD')) >= 2013

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
VishalWaghole
Specialist II
Specialist II

Hi

Please try this

Date( Date#([RECEIVED DATE], 'YYYYMMDD'),'YYYY') >= 2013

and if RECEIVED DATE having Timestamp formate then

try this

Date( Date#([RECEIVED DATE], 'YYYYMMDD hh:mm:ss'),'YYYY') >= 2013

hope that will solve ur problem.

Thanks.

Not applicable
Author

Thank you!