GELÖST
Need to Find the Months Between Two Dates
Optionen
- RSS-Feed abonnieren
- Thema als neu kennzeichnen
- Thema als gelesen kennzeichnen
- Diesen Thema für aktuellen Benutzer floaten
- Lesezeichen
- Abonnieren
- Stummschalten
- Drucker-Anzeigeseite
ashleyinman
Asteroid
10-07-2020
01:32 PM
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Moderator informieren
I have the data attached.
I'm looking to find all the months between the created date and the delv date.
Ex.
Order Created Date | Delv Date | Line Number | loc | Number | qty |
3/30/2018 | 6/14/2018 | 1.1 | 10 | 10000 | 1 |
This is what I would like it to show. I do not want to show the month of the Delv Date.
Order Created Date | Delv Date | Line Number | loc | Number | qty | Months Between |
3/30/2018 | 6/14/2018 | 1.1 | 10 | 10000 | 1 | Mar-18 |
3/30/2018 | 6/14/2018 | 1.1 | 10 | 10000 | 1 | Apr-18 |
3/30/2018 | 6/14/2018 | 1.1 | 10 | 10000 | 1 | May-18 |
I have tried using a generate rows tool but I keep getting the error "The value did not change after the Loop Expression"
Initialization Expression: [Order Created Date]
Condition Expression: [Order Created Date] < [Delv Date]
Loop Expression: DateTimeAdd([Order Created Date],1,'months')
Gelöst! Gehe zu Lösung.
1 ANTWORT 1
jdunkerley79
ACE Emeritus
10-07-2020
01:37 PM
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Moderator informieren
I would suggest a generate rows tool creating a new Date field with formula:
Init: DateTimeTrim([Order Created Date],"firstofmonth")
Condition: [MonthsBetween] < DateTimeTrim([Delv Date],"firstofmonth")
Loop: DateTimeAdd([MonthsBetween],1,"months")
This will produce a column of 1st of the months. You can then use a DateTime tool to format as MMM-YY
Sample attached