Skip to Content

Welcome to the 

Sahi Pro Customer Portal

Access your tickets, forums, courses and more, all in one single place

Sign up

You need to be registered to interact with the community.
This question has been flagged
1 Reply
74 Views
Hi Team,

I need to calculate a future date in Sahi Pro — specifically, I want to get the 10th day from today’s date.

Is there any built-in Sahi Pro function or JavaScript code snippet that can return the date after adding 10 days to the current date?

Example needed:

Today: 26 Feb 2026

Expected Output: 07 Mar 2026

Could you please guide me on how to achieve this in Sahi Pro?

Avatar
Discard

Hi James,

Please make use of the code below to get the future or past date based on the given number.

var $today=new Date();
$form = new java.text.SimpleDateFormat("dd MMM yyyy");
$date = $form.format(new Date());
$today.setDate($today.getDate() +10);//modify the number as per requirement
var $future = $form.format($today)

$future


Avatar
Discard