0

I need to calculate a column in a microflow: Column A= Date Column B is string, i.e. 20 weeks for ex. So it should calculate as: Column A – Column B = Column C which is a date. So, 20-01-2022 – 20 weeks = 23 August , 2021. The format for column B is 20 weeks. I need to convert it into date and then subtract it from column A. How can this be formulated?

asked

Pragya Pandey

1 answers

0

In your microflow:

- create an Integer variable called WeekCount
- use the following expression to set that variable parseInteger(substring(ColumnB,find(ColumnB,’ ‘)-1))
- Set the value of ColumnC with the following expression addWeeks(ColumnA,-1*$WeekCount)

Hope that helps you get started.

**EDIT**

my expression was wrong. I think it should be: parseInteger(substring(ColumnB,0,find(ColumnB,’ ‘)))

answered

Mike Kumpf