Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

115
Views
Javascript to JSP expression code conversion issue for Date format

the below code is written in javascript, is it possible to convert the same code into JSP by using the expression tag <% %>.

            var d3="${docbean.dateStartDate}";
            var d4="${docbean.dateEndDate}";
            const d1 = new Date(d3);
            const d2 = new Date(d4);
            var months;
            months  = (d2.getFullYear() - d1.getFullYear()) * 12;
            months -= d1.getMonth();
            months += d2.getMonth();
            months=months+1;
            const d6=new Date(2021, 11, 0).getDate();
            document.getElementById("demo1").innerHTML months+d6;

If there are any other means of converting the above javascript code to JSP, then pls let me know the process. Thanks.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!