Join the Alteryx Community’s Maveryx Summer Cup event! Compete, network with others, and earn your gold through a series of challenges from July 24th to August 11th. Learn more about the event here.

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Extract day name and position in associated month

ArnabSengupta
8 - Asteroid

Hi All,

 

I have date stamp in my data and I want to extract the  day name and also its position in the same month. For e.g. if my date is 08/28/2020 it should show Friday, 4 (since its the 4th Friday of the month) or 06/20/2020 = Saturday, 3 (since it is the 3rd Saturday of June).

 

I have attached a sample data set to this question and also the desired output.

 

Thank you!

3 REPLIES 3
ImadZidan
12 - Quasar

Hello @ArnabSengupta ,

 

We had something similar before not exactly but very close.

Credit to @Greg_Murray  for putting the logic for generating the calendar logic.

 

check the workflow and see if any good.

 

I hope it helps .

jdunkerley79
ACE Emeritus
ACE Emeritus

Hi,

 

I think this expression should do what you need:

DateTimeFormat([Time],"%A")
+ ", "
+ ToString(CEIL(DateTimeDay([Time])/7))

 

The DateTimeFormat will produce the day of the week name.

The second part will work out which one it is within the month.

 

Quick sample attached.

 

ImadZidan
12 - Quasar

Hello @jdunkerley79 ,

 

I have lots to learn. Thank you for this insight.

Labels