Current Date Via Profile Script | Community
Skip to main content
New Participant
June 4, 2020

Current Date Via Profile Script

  • June 4, 2020
  • 2 replies
  • 12482 views

Hi, What I am trying to achieve is - to capture the current date via profile script but now when I changed the system date to another future date and then fetch the current date then still from the profile script it is showing the current date value.

Example: Suppose the current date is 4 June and I set the date from my system to future date i.e 10 June but the profile script is fetching 4 June date.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

Charles_Thirupathi
New Participant
June 7, 2020

Hello Divya,

 

Since the Profile Scripts are in the Form of Server Side JavaScript it will return server Date only even if you change your system Date.

If you want to use your system Date in Profile Script then pass your System Date in mbox parmater and access it in Profile script.

 

Thanks,

Charles

ambikaTewari_ATCI
New Participant
June 4, 2020

Hi @divyas46613305  I did this and it is working as expected :

var nd=new Date("10 June 2020");
var cd= new Date();

if(nd.getDate() > cd.getDate())
{
return true;
}


 
Updating Media

 

ambikaTewari_ATCI
New Participant
June 4, 2020