Date Calc
- S'abonner au fil RSS
- Marquer le sujet comme nouveau
- Marquer le sujet comme lu
- Placer ce Sujet en tête de liste pour l'utilisateur actuel
- Marquer
- S'abonner
- Sourdine
- Page imprimable
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler au modérateur
I am trying to build a formula to calculate the end date if I have a start date and the term (based on the # of months). For example: if I have a start date of 11/1/2020 and the term is over 180 months what is my end date?
Thanks
Irene
Résolu ! Accéder à la solution.
- Étiquettes:
- Date Time
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler au modérateur
Hi @IreneTrieu,
The function you're going to want to use in a formula tool is DateTimeAdd. The first argument is the start date, then the number of 'unit' you want to go forward, and then the date part. In this case, 180 and 'month'.
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler au modérateur
Try the DateTimeAdd function, in a Formula tool
Here's a list of all functions: https://help.alteryx.com/current/designer/functions
Chris
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler au modérateur
Thank you! Sorry, I have various end dates. Is there a formula to take the start date x term = end date
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler au modérateur
Can you provide a sample input file?
You will need your data to be in a data stream that includes fields like this:
Start Date | Number of months |
9/21/2022 | 180 |
10/21/2022 | 6 |
You may need to use other tools in your data stream, before you use the DataTimeAdd function.
What does your data look like, at the point where you need to ad the Term?
Providing your data in a workflow, or pasting your data as text (not an image), would be helpful.
Chris
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler au modérateur
@IreneTrieu please see attached one way of getting to your desired output. You would first need to convert your dates to Alteryx date format (YYYY-MM-DD) with the DateTime tool and then drop in a Formula tool that will allow you to create a formula to add the terms to your dates and get to your end date.
If this help answer your question, please mark as solution so others can follow.
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler au modérateur
Thank you!
