Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Derive Day of Week from Date

Avatar

Avatar
Level 1
rntrp
Level 1

Likes

0 likes

Total Posts

3 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
rntrp
Level 1

Likes

0 likes

Total Posts

3 posts

Correct Reply

0 solutions
View profile
rntrp
Level 1

24-04-2020

I used the Day function on a date field and it returns an integer. How do we convert this to the day of the week - Mon, Tue etc.?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Contributor
MVP
wodnicki
MVP

Likes

923 likes

Total Posts

1,050 posts

Correct Reply

492 solutions
Top badges earned
Contributor
Shape 1
Give Back 100
Give Back 50
Give Back 25
View profile

Avatar
Contributor
MVP
wodnicki
MVP

Likes

923 likes

Total Posts

1,050 posts

Correct Reply

492 solutions
Top badges earned
Contributor
Shape 1
Give Back 100
Give Back 50
Give Back 25
View profile
wodnicki
MVP

24-04-2020

Hi,

 

In an xtk expression? You'd have to use a long chain of decode's or iif's. Assuming Day() counts from 1:

decode(Day(@date), 1, 'Sun', decode(Day(@date), 2, 'Mon', decode(Day(@date), 3, 'Tue', ...))))

 

Thanks,

-Jon

Answers (0)