Forum Discussion
tristaanogre
9 years agoEsteemed Contributor
You could do something like this:
var dateString = aqConvert.DateTimeToFormatStr(aqDateTime.Now(), '%m%d%Y%H%M') Log.SaveResultsAs("C:\\TestLogs\\Log" + dateString + "\\Log.xml", lsXML)
kcoffrin
9 years agoContributor
Thanks. Placing the variable creation and log.saveresultas inside of my function does not provide a sub folder creation. Placing the variable outside of the function and then the log.saveresultas outside as well, produces a sub folder entitled "Log' + dateString + '
- tristaanogre9 years agoEsteemed Contributor
I'm not sure I understand. The placement of the variable declaration and usage should have nothing to do without how it works. Is it possible to post your whole function?
- kcoffrin9 years agoContributor
Figured it out.
Placed: var dateString = aqConvert.DateTimeToFormatStr(aqDateTime.Now(), '%m%d%Y%H%M')
Updated: Log.SaveResultsAs("C:\\TestLogs\\Log" + dateString + "\\Log.xml", lsXML)