Convert Strings to Dates

If you have a new question you’d like our support staff to post a response to, please visit our customer community, Data Security Insiders, to pose the question in our Discussion Boards. We have a thread “Ask Our Tech Experts” that our support team monitors on a regular basis, or you can start a new discussion where other GoAnywhere users and support staff can weigh in. Log in or create your new account at

If you need an immediate response, please create a support ticket or contact our support team by email at [email protected].
2 posts Page 1 of 1


Posts: 10
Joined: Mon Dec 05, 2016 12:12 pm

Post by Grodaes » Wed Sep 20, 2017 3:46 pm

Is there any way to convert strings to date objects? I am working with a string like 20170920 and I would like to convert that to a date for manipulation. Is there any way to achieve this in a GAMFT project?



Posts: 7
Joined: Thu Feb 16, 2017 11:03 am

Post by Support_Andy » Tue Oct 03, 2017 10:29 am
To convert a string variable to a date object and modify that final date, the following steps can be used.
In this example the variable with a string of '20170920' is called ${varstring}
  • Using the Set Variable task and assigning a Variable Name of "varnew"
    value = ${ReformatDateTime(varstring, 'yyyyMMdd', 'MM-dd-YYYY')}
From there the ${varnew} variable can be adjusted
  • Using another Set Variable task and assigning a Variable Name of "adjusttime"
    value = ${AdjustDateTime(varnew, 'MM-dd-yyyy', 'days', -60)}
The + or - at the end can be used to modify the date by a specific number and the 'days' value in the variable can be modified to 'months' or 'years'
Finally the ${adjusttime} variable can be used in any subsequent tasks that need an adjusted time variable

In the sample shown the ${adjusttime} variable value = '07-23-2017'
2 posts Page 1 of 1