function getCurDateTimeForOffice() {
    var date = new Date()

    var year = date.getFullYear()
    var month = date.getMonth() + 1
    var day = date.getDate()
    var hour = date.getHours()
    var min = date.getMinutes()
    var sec = date.getSeconds()

    month = (month < 10 ? '0' : '') + month
    day = (day < 10 ? '0' : '') + day
    hour = (hour < 10 ? '0' : '') + hour
    min = (min < 10 ? '0' : '') + min
    sec = (sec < 10 ? '0' : '') + sec

    return (
      year + '-' + month + '-' + day + 'T' + hour + ':' + min + ':' + sec + 'Z'
    )
  }
Generate string of the current date and time.

This method generating a string with the current date and time in Office XML format.

@return String of the current date and time in Office XML format.