Announcement

Collapse
No announcement yet.

[SOLVED] sc_date macro error

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • [SOLVED] sc_date macro error

    Please look at the picture properly!

    Then intention is to get the field dateOfCollection, add a number of days to it and put the result in the expiryDate.
    The results are weird. I think this is a bug.

    Let me know how to solve this!
    Pleas not that the javascript message alert displays the alert date (expiry date properly) !!
    So it seems to a problem in formatting..

    date validation error.png

  • #2
    Try to get that code in the onchange event instead of the onclick.

    Regards

    Comment


    • #3
      Solved:
      by formating the $expiryDate like this:

      //Initializing the parameters to be add
      $add_days = 1; //adding 30 days
      $add_months = 0; //adding nothing to months
      $add_years = 0; //adding nothing to years


      $ExpiryDate = sc_date({DateOfCollection}, 'yyyy/mm/dd', '+', $add_days, $add_months, $add_years);


      {ExpiryDate} = sc_date_conv($ExpiryDate, "yyyy/mm/dd", "aaaammdd");

      ---------------------------------------------------------------------------------------------
      interestingly, the expiryDate format is dd/mm/yyyy!

      this is definitely a bug

      Comment


      • #4
        Bro,

        Can you send me a screenshot of your solved issue please?

        This sc_date macro is a little bit tricky!
        Best regards,
        Carlos Lacerda.
        ScriptCase Commercial Manager.

        Skype: carlos.lacerda82
        Email: carlos@scriptcase.net
        Visit our Blog: http://www.scriptcase.net/blog/
        Visit out fan page: http://www.facebook.com/Scriptcase

        Comment


        • #5
          Originally posted by carlos View Post
          Bro,

          Can you send me a screenshot of your solved issue please?

          This sc_date macro is a little bit tricky!
          ohh....guess i haven't been here in a while...am going to send it later. ill try & replicate it later...its been a while.

          Comment


          • #6
            Hello,

            I'll put this thread as solved, but you can post the solution later on.
            Last edited by John L. Santos; 04-22-2015, 09:28 AM.
            Best Regards,
            John L. Santos

            Bug Tracker Team
            NetMake - IT Solutions

            Comment

            Working...
            X