function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Raja JammulaRaja Jammula 

Java script URL date field not populating correctly can anyone please help?

I am using below script:
<script>
        function setLogcallURL(){
        var url='/00T/e?title=Call&who_id={!Contact.Id}&retURL=/{!Contact.Id}' 
        
        if("{!$Profile.Name}" == "WI" && ("{!$UserRole.Name}"=="AE - E"||"{!$UserRole.Name}"=="AE - W"||"{!$UserRole.Name}"=="AE - S")){ 
            url+='&tsk5=Meeting'; 
            url+='&tsk4={!TODAY()}'; 
            url+='&tsk12=Completed'; 
            url+='&RecordType=0120j0000008dlO'; 
            url+='&ent=Task'; 
        }else if("{!$Profile.Name}" == "WI") { 
            url+='&tsk5=Call'; 
            url+='&followup=1'; 
            url+='&tsk4={!TODAY()}'; 
            url+='&RecordType=01250000000HiDD'; 
            url+='&RecordType_fu=01250000000HiDD'; 
        }else{ 
            url+='&followup=1'; 
            url+='&tsk5=Call'; 
        }
        window.open(url,"_self");
        }
    
    </script>
from vf page:
     <apex:commandButton value="Log a Call"  oncomplete="setLogcallURL()" rendered="{!contact.CSG_Status__c == 'Active'}"/>

&tsk4={!TODAY()} it's not the populating the date correctly 
it's populating as: Tue Sep 26 00:00:00 GMT 2017 instead 09/26/2017

​can anyone let me know what i have to change here to populate the date as 09/26/2017
Asif Ali MAsif Ali M
Use the below code for mm/dd/YYYY format
url+='&tsk4={!MONTH(TODAY())}/{!DAY(TODAY())}/{!YEAR(TODAY())}';