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

Announcements
Only at Qlik Connect! Guest keynote Jesse Cole shares his secrets for daring to be different. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
QSense
Creator II
Creator II

Conversion field format

Hello everyone,

In order to use in qw ,

I must convert number field into date format

I get data from oracle db number format is : YYYYWW and also date format should be YYYYWW

to_date(to_char(ORIGIN_YEAR_WEEK),'YYYYWW') sql auery does not work

Best regards

5 Replies
sujeetsingh
Master III
Master III

Hi,

Just use function

      -Dtae#(date_field)

       or you can also try

     

      -Date(date_field)

QSense
Creator II
Creator II
Author

Ii did not work

swuehl
MVP
MVP

Try

MakeWeekDate(YYYY [ , WW [ , D ] ] )

function, like

Makeweekdate(left(ORIGIN_YEAR_WEEK,4),right(ORIGIN_YEAR_WEEK,2) )

in your LOAD or an expression.

Hope this helps,

Stefan

QSense
Creator II
Creator II
Author

ORIGIN_YEAR_WEEK column' s data are like this 201201,201202

swuehl it didnt work in expression I will try in load statement

swuehl
MVP
MVP

=MakeWeekDate(left(201202,4),right(201202,2))

returns 09/01/2012 when used as expression in a textbox, seems ok to me.