Forum Discussion

JennyH11's avatar
JennyH11
Frequent Contributor
7 years ago

Setting the system date to Today + 2

Hi    I am trying to work out how to change the system date based on todays date to the date in 2 days time. I need it to be dynamic as the rest of the dates in the test are dynamic. I realise th...
  • AlexKaras's avatar
    7 years ago

    Hi Jenny,

     

    a) Your code snippet does not look correct. I would expect this:

    aqDateTime.SetSystemDateTime(aqDateTime.AddDays(aqDateTime.Today(), 2))

     

    b) Documentation for the .SetSystemDateTime() method mentions that in order to succeed, the method mus be executed with admin privileges.