function Now(){
var dtNow = new Date();
var sNow = ( dtNow.getMonth()+1) + "/" + dtNow.getDate() + "/" + dtNow.getFullYear() + " "
+ dtNow.getHours() + ":" + dtNow.getMinutes() + ":" + dtNow.getSeconds();
return(sNow)
}
Note
- You should use SetFormattedFieldValue() if you are planning to use this on a business component field.
- This function returns server time. You may need to make adjustments based on local time for the user.