Forum Discussion
baxatob
10 years agoCommunity Hero
initial_date = '9/2/2016' new_date = aqDateTime.AddMonths(initial_date, -36) # ==> 9/2/2013
It uses system format by default. If you need another date format, use aqConvert.DateTimeToFormatStr method.
- Janis10 years agoOccasional Contributor
Please suggest what shoud I do to get the date as Feb 5, 2016?
- baxatob10 years agoCommunity Hero
date = 2/5/2016 new_date = aqConvert.DateTimeToFormatStr(date, "%b %#d, %Y") # ==> Feb 5, 2016
All date/time specifiers are here: https://support.smartbear.com/viewarticle/73413/