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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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

Labels (1)
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
Champion III
Champion III

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
Champion III
Champion III

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

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