# Add days into a date

**URL:** https://www.finalbuilder.com/forums/t/add-days-into-a-date/5573
**Category:** Discussion
**Created:** [June 29, 2017, 9:41am UTC](https://www.finalbuilder.com/forums/t/add-days-into-a-date/5573 "2017-06-29T09:41:04Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![mohitvashistha01](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/mohitvashistha01/32/186_2.png) [@mohitvashistha01](https://www.finalbuilder.com/forums/u/mohitvashistha01)
#### Post date: [June 29, 2017, 9:41am UTC](https://www.finalbuilder.com/forums/t/add-days-into-a-date/5573/1 "2017-06-29T09:41:04Z")

</div>

Hi&nbsp;  
I want to run a script that accepts the start date and end date from command line. Usually the script runs from 4 days behind from today to till date. I am able to get the today’s date using&nbsp;$Server.Now.Format(“yyyy-MM-dd”)$. I want to deduct 4 days from the now date and set that value to a configuration variable. I am not sure how to achieve that.

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [June 29, 2017, 10:09am UTC](https://www.finalbuilder.com/forums/t/add-days-into-a-date/5573/2 "2017-06-29T10:09:09Z")

</div>

I don’t there is anything in the current release to do that using expressions. Your best bet might be to run a finalbuilder script or a powershell script to do the date manipulation and then pass it on to the process you want to run. You can set Continua CI variables from scripts using formatted output - [http://wiki.finalbuilder.com/displa…g+Messages](http://wiki.finalbuilder.com/display/continua/Custom+Log+Messages)
