Closed vlauzeckas closed 1 year ago
Hi @vlauzeckas
Tableau interprets 1 as Sunday (hence 2 as Monday) etc.
as i understand it is configurable on data source level in tableau:
currently if i configure that my week starts on Monday i get wrong results
Could you please explain what the "wrong results" are?
@vlauzeckas fyi: both DATEPART('weekday', #2022-12-19#) and DATEPART('weekday', #2022-12-19#, 'monday') do always return 2.
ghmm, actually you are right. i have tested with postgresl and it behaves similarly
hi, we have issues while running "datepart" function. I found in your code such line:
<formula part='weekday'>toDayOfWeek(%2) mod 7 + 1</formula>
Why do you add this 7+1?
I have tried to run this directly on clickhouse:
select toDayOfWeek( toDate('2022-12-19')) mod 7 + 1
And it returns 2 where December 19 is Monday.