date format

 1 Replies
 0 Subscribed to this topic
 52 Subscribed to this forum
Sort:
Author
Messages
TommyT
Veteran Member
Posts: 58
Veteran Member
    I have a date variable in ccyymmdd format which I need to add 7 days to, BUT I need the output back in ccyymmdd.

    When I use the addday(var1,numdays) in the designer I get the right future date back but its in a long format that I cant reconvert for use in an AGS call.

    Basically Im at 20100101 and I need to add a number (say 7) and get back 20100108.
    Sam Simpson
    Veteran Member
    Posts: 239
    Veteran Member
      The pflow.js provide 3 dates formats: JS date, AGS date and DME date formats. There are several functions that you can use to transform your dates into one of these. Your var1 is in js date format and you will use getDateAGS to transform it into yyyymmdd format. ex...

      var1=getDateAGS(var1)