It's exactly the same, only you use a different date format string. Something like this should work:
var dateField = this.getField("CurrentDate");
var timeField = this.getField("CurrentTime");
if (dateField.value=="") dateField.value = util.printd("mm/dd/yyyy", new Date());
if (timeField.value=="") timeField.value = util.printd("HH:MM", new Date());
Embed this script at the doc-level and it will populate these fields with the current date and time when the file is opened, if they were previously empty.