Alteryx Designer Desktop Discussions

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

End of the month for whole year

Ecaterina
7 - Meteor

Hello,

I want to calculate the end of month for a whole year. How can I do this?

Thanks 

6 REPLIES 6
MarqueeCrew
20 - Arcturus
20 - Arcturus

@Ecaterina ,

 

 datetimetrim(). Is your friend:

 

DateTimeTrim(dt,t)

Remove unwanted portions of a date/time and return the modified date/time.

 

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
RolandSchubert
16 - Nebula
16 - Nebula

Hi @Ecaterina ,

 

you could use DateTime functions (DateTimeParse, DateTimeAdd) combined with Generate Rows tool to create a list of EOM dates. I've attached a sample workflow.

 

Best,

 

Roland

Ecaterina
7 - Meteor

@RolandSchubert

 Could you attache a sample? 

Thanks

Ecaterina

RolandSchubert
16 - Nebula
16 - Nebula

Seems I missed to attach the workflow ...

Ecaterina
7 - Meteor

Thanks.  it is work well

ChrisTX
15 - Aurora

Look at these functions:
  DateTimeLastOfMonth()
  DateTimeFirstOfMonth() - then subtract one day

 

Use the Generate Rows tool

 

In this post:
https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Using-drop-down-list-boxs-to-populate-...

 

there is a macro that calculates many common dates like:
period
year
day
first day of month
last day of month
isWithin5DaysOfClose
isWithin5DaysOfOpen
day of week text
isWeekday
isWeekend
day of week text short
day of year
month text
month text short
qtr_txt
qtr_num
isEndOfMonth
isFirstOfMonth
isClosingPeriod
isOpeningPeriod
weekOfYear

 

Labels