returning the 1st day of the month based on a date field
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
10005970
6 - Meteoroid
‎02-22-2022
04:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Alteryx Community.
I have a Transaction date field in a workbook (the format is standard date Time YYYY-MM-DD) I want to add a column that will display the first day of the month in the same date time format. see example below
thanks in advance
EG
Transaction Date | 1st day of Transaction month |
2021-12-20 | 2021-12-01 |
2021-12-29 | 2021-12-01 |
2022-01-07 | 2022-01-01 |
2022-01-08 | 2022-01-01 |
2022-02-18 | 2021-02-01 |
Labels:
- Labels:
- Date Time
5 REPLIES 5
17 - Castor
‎02-22-2022
04:53 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @10005970 How about something like Left([Transaction Date],7)+"-01"
AngelosPachis
16 - Nebula
‎02-22-2022
04:54 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @10005970 ,
In a formula tool, try the following expression
DateTimeTrim([Transaction Date],"firstofmonth")
That should give you what you're looking for.
Cheers,
Angelos
22 - Nova
‎02-22-2022
04:56 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎02-22-2022
05:00 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
That worked perfect thank you.
20 - Arcturus
‎02-22-2022
05:57 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Here are some lasting postings concerning dates:
https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/Marquee-Crew-s-Guide-to-Dates/ta-p/...
They are easier found using google ( @WillM )
Cheers,
Mark
Alteryx ACE & Top Community Contributor
Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
