Forum Discussion
EmmaGraham
2 years agoCommunity Member
Is it possible to have an automatic adjusted date based on the current system date
Hi Team, I only get to use SL a few times per year so what I'm asking may be a simple fix.
I have created a basic activity where the leaner needs to look at an expiry date shown (the expiry date i...
JesiWatts
2 years agoCommunity Member
How would you go about doing this for a field entry in ASL? I found some javascripts on this: //
Get the current date var currentDate = new Date();
// Calculate the date 35 days in the future
var futureDate = new Date(currentDate); futureDate.setDate(currentDate.getDate() + 35);
// Format the future date as a string (optional)
var formattedFutureDate = futureDate.toDateString();
// Display the result
console.log("Current Date:", currentDate.toDateString()); console.log("Future Date (35 days later):", formattedFutureDate);