pmcfarlain Posted August 20, 2021 Report Share Posted August 20, 2021 I'd like to make the label on my datapage display the current month. Is there a way I can do that? Quote Link to comment Share on other sites More sharing options...
0 TellMeWhy Posted August 20, 2021 Report Share Posted August 20, 2021 24 minutes ago, pmcfarlain said: I'd like to make the label on my datapage display the current month. Is there a way I can do that? Anything Dynamic in a Webpage needs JavaScript Put this on your Label <span id="CurrMonth"></span> Then on Footer <script> var d = new Date(); var n = d.getMonth(); var months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']; document.getElementById("CurrMonth").innerHTML = months[n]; </script> getMonth returns 0 for January, 1 for February and so on Quote Link to comment Share on other sites More sharing options...
0 pmcfarlain Posted August 20, 2021 Author Report Share Posted August 20, 2021 4 minutes ago, TellMeWhy said: Anything Dynamic in a Webpage needs JavaScript Put this on your Label <span id="CurrMonth"></span> Then on Footer <script> var d = new Date(); var n = d.getMonth(); var months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']; document.getElementById("CurrMonth").innerHTML = months[n]; </script> getMonth returns 0 for January, 1 for February and so on Great, thanks! Quote Link to comment Share on other sites More sharing options...
Question
pmcfarlain
I'd like to make the label on my datapage display the current month. Is there a way I can do that?
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.