Adding Date Column To Build Data Table

I am building a table of 4 columns that contains different information. One of those columns, titled “Start Date” needs to contain a date, format “MMddyyyy,” that is 7 days (-7) prior to the current. I have used the function “=TODAY()-MOD(WEEKDAY(TODAY(),1),7)” in the past some for the default value.

For some reason now that approach is not working for me. Is there anyway that I can still perform this task in UiPath using a particular command or variable type?

If you are looking for a formula for the date 7 days ago try using:
DateTime.now.AddDays(-7)
to format it add .tostring(“MMddyyyy”)

1 Like

Thanks Matt, I got it to work.

Awesome. Can you mark this as solved? Thanks.