Forum Discussion
Hi,
how about this? --> https://support.smartbear.com/viewarticle/73731/
E.g.:
var x = aqDateTime["Now"]();
var x = aqString["Replace"](x,'2016','2013');
Greetings
- tristaanogre10 years agoEsteemed Contributor
The replace method is correct... however, I don't think you can do it directly with aqDateTime(Now) as that doesn't return a string but a DateTime value which is a numeric value. What you would have to do is take what aqDateTime returns and run it through aqConvert.DateTimeToStr or aqConvert.DateTimeToFormatStr in order to put the date into a string format. Then you can do the necessary string replace call.
- Kostja10 years agoContributor
Hi,
don't want to spam here, but just for the protocol (and the code was only as an example) :) -->
- tristaanogre10 years agoEsteemed Contributor
Fair enough.. :) It must do an automatic data type conversion when referenced like that... one of the "benefits" of a scripting language vs. a strong typed language. :)