Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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.
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.
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.
Use trim function on both fields....
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;