Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Welcome to Qlik Community! Check out our new navigation! FIND OUT MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Formattng WeekDay

Hi guys,

I need to join two tables, but having problems to set up the common field.

TargetDate3:

LOAD

Y

,WeekDay(Date#(Y,'DD/MM/YYYY hh:mm')) as Y.Day

,WeekDay(Date#(Y,'DD/MM/YYYY hh:mm')) as Y.Day1

,Round([B+p]) as [B+p]

RESIDENT Formulas;

//LEFT

JOIN LOAD

Date#(WDay,'DDD') as Y.Day

,Date#(WDay,'DDD') as Y.Day2

,WorkableMinutes

RESIDENT WorkDays;

Take a look at the values of the fields Y.Day1 and Y.Day2:

Y.Day

Y.Day1

Y.Day2

Sun

Sun

Mon

Mon

Tue

Tue

Wed

Wed

Thu

Thu

Fri

Fri

0

0

2

2

How can I work it around?

Thanks in advance,

Aldo.



1 Solution

Accepted Solutions
pover
Luminary Alumni
Luminary Alumni

Aldo,

Try Text(WeekDay(Date#(Y,'DD/MM/YYYY hh:mm'))) to just use the text part of the dual data type.

Or, Weekday(Date#(WDay,'DDD')) in the second table.

Regards.



View solution in original post

4 Replies
pover
Luminary Alumni
Luminary Alumni

Aldo,

Try Text(WeekDay(Date#(Y,'DD/MM/YYYY hh:mm'))) to just use the text part of the dual data type.

Or, Weekday(Date#(WDay,'DDD')) in the second table.

Regards.



Not applicable
Author

Hi Karl, Thanks for your answer.

I tried Text(...) in the first table. I get day names ("Sun", etc), but still not the same as in the second table.

Like

Sun

Sun

Any other idea?

Thanks,

Aldo.

deepakk
Partner - Specialist III
Partner - Specialist III

Use trim function on both fields....

Not applicable
Author

Great! it works.

Thanks guys.

LOAD

Trim( Text( WeekDay(Date#(Y,'DD/MM/YYYY hh:mm')) ) ) as Y.Day

RESIDENT Formulas;

LEFT JOIN LOAD

Trim( Text( Date#(WDay,'DDD') ) ) as Y.Day

RESIDENT WorkDays;