Forum Discussion

gdave's avatar
gdave
Regular Contributor
7 years ago

Code Expression

Hi

 

Kindly refere to the attached screenshot before you read the below query so that it will make more sense..

 

I need to enter today's date in my date cell (called effective end date) for which I used 'Keys' operation and for the 'Value' I used code expression as "aqConvert.DateTimetoFormatStr(aqDateTime.Today(), '%d/%m/%Y')". This however didn't work as expected but surprisingly only date part was executed and I could see the date format as 13/00/0003.

 

Can someone please advise where have I gone wrong ?

 

Also I'll appreciate if you can provide me the solution to enter yesterday's date instead of today. Thanks

8 Replies

  • shankar_r's avatar
    shankar_r
    Community Hero

    It looks like issue when you use Keys() method.

     

    Have you tried SetText() function? if not please try using this.

     

     

    • gdave's avatar
      gdave
      Regular Contributor

      Just tried Settext function, my test doesn't fail but it does not populate date in the date field as well.


      shankar_rwrote:

      It looks like issue when you use Keys() method.

       

      Have you tried SetText() function? if not please try using this.

       

       


       

      • shankar_r's avatar
        shankar_r
        Community Hero

        Then i would suggest to select by using calendar object which you will get by clicking down arrow.