Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join us at the Cloud Data and Analytics Tour! REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to convert number to Date Format

i have the following number

Test)

101110.

i would like to convert this to date format so that i can get the year 2011, the Month November and the day 10 and even the week from this.

i have treid Date#(date(Test) with luck.

Best

Brad

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Then try:

Load

Makdate(2000+ num(left(yourfield,2)), num(mid(yourfield,3,2)), num(right(yourfield,2)) )  as Date

View solution in original post

5 Replies
tresesco
MVP
MVP

How do you interpret it?

first two digits for month? second two for year? last two day?

Then try like:

Load

Makdate(2000+num(mid(yourfield,3,2)) , num(left(yourfield,2)), num(right(yourfield,2)) )  as Date

Not applicable
Author

First two year

Second two Month

Sent from my iPhone

sujeetsingh
Master III
Master III

Coyen,

If this is not a date field .

Then you need to calculate it as

String and expressions

er_mohit
Master II
Master II

Try this in text object

and replace code with field

=left(Date#('101110'),2)&'-'&(Mid( Date#('101110'),3,2))&'-'&'2'&Mid( Date#('101110'),2,3)

tresesco
MVP
MVP

Then try:

Load

Makdate(2000+ num(left(yourfield,2)), num(mid(yourfield,3,2)), num(right(yourfield,2)) )  as Date

View solution in original post