Hi community,
i would highly appreciate some help with my issue
i am trying to use a formula tool to calculate the period of six months prior to the date in my input file
so the input file date is june 30 2024, and i need the formula tool to calculate it back to jan 1 2024, and so on for dec
is there a way to do that?
@Basma_alrubaish
yes this can be done using formula tool.
datetimeformat(DateTimeAdd(DateTimeparse([Date],"%B %d %Y"),-6,"months"),"%B %d %Y")
thank you Raj
do you know what formula i can use to get the results?
if i use DateTimeAdd([Period start ], -180, 'day') it will give me exactly 180 days diff
but i want the start day for june 30 to be jan 1
and for dec 31 to be june 30
@Basma_alrubaish Try this.
datetimeformat(DateTimeTrim(DateTimeAdd(DateTimeparse([Date],"%B %d %Y"), -180,'days'), 'month'),"%B %d %Y")
mark done if solved.
@Basma_alrubaish
find workflow attached for reference
is there a way i can use the same initial formula but have the start date fixed as the first date of the month?
DateTimeAdd([Period start], -6, 'months')
@Basma_alrubaish
this will work
datetimeformat(DateTimeTrim(DateTimeAdd(DateTimeparse([Date],"%B %d %Y"), -5,'months'), 'month'),"%B %d %Y")