To set the current date value in the date field of transaction , refer the below sample code
Tag: current date
To add one day to the current date.
Add day to date
Adding Month to date (Current date + 6 months)
This script is to add six months to the current date and convert it to the correct date format so that the date could be set to the NS custom field