3

Is there a way to insert the current date and/or time in Google Slides?

2

UPDATE: Today Google announced that they will launch the Google Slides API, so very soon could be possible to insert the current date/time in a Google presentation.


At this time Google Slides doesn't include a feature to insert fields to automatically update dates, times or any other volatile information. To learn about what features are included in Google Slides take a look to Slides - Google Docs editors Help

  • Thanks, I guess that things like this still make the Google apps a less desirable option compared to Office 365. Not saying that MS Office is the ultimate, but IMHO way better for serious document creation in a business environment. – Alex Ixeras May 19 '16 at 2:22
  • @AlexIxeras: Looks that very soon will be possible to insert a date/time automatically. – Rubén May 19 '16 at 3:49
  • Thanks for that. Now all I need is to connect the API to a time server - that is if the APIs can ingest NTP :D – Alex Ixeras May 19 '16 at 3:51
2

In case someone else finds this, I was able to automate this using Google Apps Scripts which is available under the Tools menu. Here is the script I made which updates any text box that has the description field set to "$date" to the current date every time the presentation is opened.

function onOpen() {
  var date = Utilities.formatDate(new Date(), "PST", "M/d/yyyy"); 
  var pattern = "\\b\\d{1,2}/\\d{1,2}/\\d{4}\\b"; 
  var slides = SlidesApp.getActivePresentation().getSlides();
  var slidesLength = slides.length;
  for (var i = 0; i < slidesLength; i++) {  
    var shapes = slides[i].getShapes();
    var shapesLength = shapes.length;
    for (var j = 0; j < shapesLength; j++) {
      if (shapes[j].getDescription() == "$date") {
        var textRange = shapes[j].getText();
        textRange.clear();
        textRange.insertText(0, date);
      }
    }
  }
}

Not the answer you're looking for? Browse other questions tagged or ask your own question.